/
githubmr
/
facebook-react-native
Обзор
Документация
Войти
/
githubmr
/
facebook-react-native
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
main
packages/react-native-codegen/e2e/namespaced/__tests__/components/GeneratePropsH-test.js
30 строк
938 B
Tim Yung
RN: Delete `@oncall` Annotations (#51416)
18 май 2025, 02:18
18 май 2025, 02:18
84de8a0
Код
Авторство
О чём код?
/** * Copyright (c) Meta Platforms, Inc. and affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow strict-local * @format */ 'use strict'; const generator = require('../../../../src/generators/components/GeneratePropsH'); const {FlowParser} = require('../../../../src/parsers/flow/parser'); const fs = require('fs'); const FIXTURE_DIR = `${__dirname}/../../__test_fixtures__/components`; const fixtures = fs.readdirSync(FIXTURE_DIR); const parser = new FlowParser(); fixtures.forEach(fixture => { it(`GeneratePropsH can generate for '${fixture}' using types under single namespace`, () => { const libName = 'RNCodegenModuleFixtures'; const schema = parser.parseFile(`${FIXTURE_DIR}/${fixture}`); const output = generator.generate(libName, schema); expect(Object.fromEntries(output)).toMatchSnapshot(); }); });