/
githubmirror
/
jest
Обзор
Документация
Войти
/
githubmirror
/
jest
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
e2e/__tests__/runProgrammatically.test.ts
21 строка
645 B
Simen Bekkhus
chore: enable lint rule for better `RegExp`es (#14803)
29 дек 2023, 12:23
Не верифицирован
29 дек 2023, 12:23
eaea490
Код
Авторство
О чём код?
/** * 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. */ import {resolve} from 'path'; import {run} from '../Utils'; const dir = resolve(__dirname, '..', 'run-programmatically'); test('run Jest programmatically cjs', () => { const {stdout} = run('node cjs.js --version', dir); expect(stdout).toMatch(/\d{2}(?:\.\d{1,2}){2}\S*-dev$/); }); test('run Jest programmatically esm', () => { const {stdout} = run('node index.js --version', dir); expect(stdout).toMatch(/\d{2}(?:\.\d{1,2}){2}\S*-dev$/); });