Skip to content

Commit

Permalink
docs: remove mention of old runCore
Browse files Browse the repository at this point in the history
  • Loading branch information
nicojs committed Oct 13, 2023
1 parent 098cc21 commit 65fe53f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions docs/ProgrammaticApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import jest from 'jest';

const {globalConfig, configs} = await jest.readConfigs(process.argv, ['.']);
const {result} = await jest.runCore(globalConfig, configs);
console.log(`runCore success, ${result.numPassedTests} passed tests.`);
console.log(`run success, ${result.numPassedTests} passed tests.`);
```

This example runs Jest as the normal Jest command line interface (CLI) would.
Expand Down Expand Up @@ -84,7 +84,7 @@ It takes in in an array of command line arguments (for example, `process.argv`)
import {runCLI} from 'jest';

const {results, globalConfig} = await runCLI(process.argv, ['.']);
console.log(`runCore success, ${result.numPassedTests} passed tests.`);
console.log(`run success, ${result.numPassedTests} passed tests.`);
```

### `runCore` \[function]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`createJest run programmatically: stdout 1`] = `"runCore success, 1 passed tests."`;
exports[`createJest run programmatically: stdout 1`] = `"run success, 1 passed tests."`;

exports[`createJest run programmatically: summary 1`] = `
"Test Suites: 1 passed, 1 total
Expand Down
2 changes: 1 addition & 1 deletion e2e/run-programmatically/jest.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ jest.globalConfig = {
...jest.globalConfig,
};
const {results} = await jest.run();
console.log(`runCore success, ${results.numPassedTests} passed tests.`);
console.log(`run success, ${results.numPassedTests} passed tests.`);

0 comments on commit 65fe53f

Please # to comment.