Skip to content

Commit

Permalink
4.0.3 release
Browse files Browse the repository at this point in the history
  • Loading branch information
MikyungKim committed Jun 21, 2021
2 parents b0285d4 + 7b64197 commit 806d648
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 6 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## 4.0.3 (June 21, 2021)

### test

* Fixed not reading a local `./src/setupTests.js` setup file.
* Fixed `jest.restoreAllMocks()` throws errors.

## 4.0.2 (May 3, 2021)

### pack
Expand Down
2 changes: 1 addition & 1 deletion config/jest/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ require('../dotenv').load(app.context);

// Find any applicable user test setup file
const userSetupFile = ['mjs', 'js', 'jsx', 'ts', 'tsx']
.map(ext => path.join(app.context, 'src', 'setupTests' + ext))
.map(ext => path.join(app.context, 'src', 'setupTests.' + ext))
.find(file => fs.existsSync(file));

module.exports = {
Expand Down
14 changes: 11 additions & 3 deletions config/jest/setupTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,18 @@ beforeEach(() => {
});

afterEach(() => {
const actual = console.warn.mock.calls.concat(console.error.mock.calls).filter(([m]) => filterExp.test(m));
const actual = (console.warn.mock ? console.warn.mock.calls : [])
.concat(console.error.mock ? console.error.mock.calls : [])
.filter(([m]) => filterExp.test(m));
const expected = 0;
console.warn.mockRestore();
console.error.mockRestore();

if (console.warn.mock) {
console.warn.mockRestore();
}
if (console.error.mock) {
console.error.mockRestore();
}

expect(actual).toHaveLength(expected);
});

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@enact/cli",
"version": "4.0.2",
"version": "4.0.3",
"description": "Full-featured build environment tool for Enact applications.",
"main": "index.js",
"author": "Jason Robitaille <[email protected]>",
Expand Down

0 comments on commit 806d648

Please sign in to comment.