Skip to content

Commit

Permalink
remove word
Browse files Browse the repository at this point in the history
  • Loading branch information
SimenB committed Sep 20, 2021
1 parent 273f4e7 commit 11f1edb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`prints useful error for environment methods after test is done 1`] = `
ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From test __tests__/afterTeardown.test.js.
ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From __tests__/afterTeardown.test.js.
9 | test('access environment methods after done', () => {
10 | setTimeout(() => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`prints useful error for requires after test is done 1`] = `
ReferenceError: You are trying to \`import\` a file after the Jest environment has been torn down.
ReferenceError: You are trying to \`import\` a file after the Jest environment has been torn down. From __tests__/lateRequire.test.js.
9 | test('require after done', () => {
10 | setTimeout(() => {
Expand Down
2 changes: 1 addition & 1 deletion e2e/__tests__/environmentAfterTeardown.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ test('prints useful error for environment methods after test is done', () => {

expect(wrap(interestingLines)).toMatchSnapshot();
expect(stderr.split('\n')[9]).toBe(
'ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From test __tests__/afterTeardown.test.js.',
'ReferenceError: You are trying to access a property or method of the Jest environment after it has been torn down. From __tests__/afterTeardown.test.js.',
);
});
2 changes: 1 addition & 1 deletion packages/jest-runtime/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2004,7 +2004,7 @@ export default class Runtime {

private _logFormattedReferenceError(errorMessage: string) {
const testPath = this._testPath
? ` From test ${path.relative(this._config.rootDir, this._testPath)}.`
? ` From ${path.relative(this._config.rootDir, this._testPath)}.`
: '';
const originalStack = new ReferenceError(`${errorMessage}${testPath}`)
.stack!.split('\n')
Expand Down

0 comments on commit 11f1edb

Please sign in to comment.