File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -747,15 +747,15 @@ expect(() => throw new Error('throw expression')).toThrow('throw expression');
747747> ).toStrictEqual ({ data: ' imported' });
748748> ` ` `
749749>
750- > Or:
750+ > Or use ` JSON . stringify ` + ` toBe ` (or your testing framework's equivalent) :
751751>
752752> ` ` ` javascript
753753> expect (JSON .stringify (require (` ${ __dirname } /imported-file.json` ))).toBe (
754754> JSON .stringify ({ data: ' imported' })
755755> );
756756> ` ` `
757757>
758- > Or even :
758+ > Or use ` isEqual ` (or your testing framework's equivalent) :
759759>
760760> ` ` ` javascript
761761> expect (require (` ${ __dirname } /imported-file.json` )).toEqual ({
@@ -1298,15 +1298,15 @@ following:
12981298> ).toStrictEqual ({ data: ' imported' });
12991299> ` ` `
13001300>
1301- > Or:
1301+ > Or use ` JSON . stringify ` + ` toBe ` (or your testing framework's equivalent) :
13021302>
13031303> ` ` ` javascript
13041304> expect (JSON .stringify (require (` ${ __dirname } /imported-file.json` ))).toBe (
13051305> JSON .stringify ({ data: ' imported' })
13061306> );
13071307> ` ` `
13081308>
1309- > Or even :
1309+ > Or use ` isEqual ` (or your testing framework's equivalent) :
13101310>
13111311> ` ` ` javascript
13121312> expect (require (` ${ __dirname } /imported-file.json` )).toEqual ({
You can’t perform that action at this time.
0 commit comments