/
githubmr
/
facebook-react
Обзор
Документация
Войти
/
githubmr
/
facebook-react
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
main
packages/react/src/__tests__/ReactVersion-test.js
26 строк
970 B
Andrew Clark
[Codemod] Update copyright header to Meta (#25315)
18 окт 2022, 18:19
Не верифицирован
18 окт 2022, 18:19
9cdf8a9
Код
Авторство
О чём код?
/** * 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. * * @emails react-core * @jest-environment node */ 'use strict'; // NOTE: Intentionally using the dynamic version of the `gate` pragma to opt out // the negative test behavior. If this test happens to pass when running // against files source, that's fine. But all we care about is the behavior of // the build artifacts. // TODO: The experimental builds have a different version at runtime than // the package.json because DevTools uses it for feature detection. Consider // some other way of handling that. test('ReactVersion matches package.json', () => { if (gate(flags => flags.build && flags.stable && !flags.www)) { const React = require('react'); const packageJSON = require('react/package.json'); expect(React.version).toBe(packageJSON.version); } });