Skip to content

Commit

Permalink
Fix lint e2e
Browse files Browse the repository at this point in the history
  • Loading branch information
nicojs committed Apr 21, 2023
1 parent b9e9278 commit d8f6e26
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
4 changes: 2 additions & 2 deletions e2e/__tests__/runProgrammatically.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ import {extractSummary, run} from '../Utils';

const dir = resolve(__dirname, '..', 'run-programmatically');

test('runCLI Jest programmatically cjs', () => {
test('run Jest programmatically cjs', () => {
const {stdout} = run('node cjs.js --version', dir);
expect(stdout).toMatch(/\d{2}\.\d{1,2}\.\d{1,2}[-\S]*-dev$/);
});

test('runCLI Jest programmatically esm', () => {
test('run Jest programmatically esm', () => {
const {stdout} = run('node index.js --version', dir);
expect(stdout).toMatch(/\d{2}\.\d{1,2}\.\d{1,2}[-\S]*-dev$/);
});
Expand Down
2 changes: 1 addition & 1 deletion e2e/run-programmatically/cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@

// Running Jest like this is not officially supported,
// but it is common practice until there is a proper API as a substitute.
require('jest').runCLI(process.argv);
require('jest').run(process.argv);
4 changes: 2 additions & 2 deletions e2e/run-programmatically/esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
* LICENSE file in the root directory of this source tree.
*/

import {runCLI} from 'jest';
import {run} from 'jest';

// Running Jest like this is not officially supported,
// but it is common practice until there is a proper API as a substitute.
runCLI(process.argv);
run(process.argv);
8 changes: 8 additions & 0 deletions e2e/run-programmatically/src/app.spec.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
/**
* 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.
*/
/* eslint-disable no-undef */

describe('jest-core', () => {
it('should run this test', () => {});
});

0 comments on commit d8f6e26

Please sign in to comment.