Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: migrate jest-mock to TypeScript #7847

Merged
merged 9 commits into from
Feb 10, 2019
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module.exports = {
{argsIgnorePattern: '^_'},
],
'import/order': 'error',
'no-dupe-class-members': 'off',
'no-unused-vars': 'off',
},
},
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
- `[@jest/types]`: New package to handle shared types ([#7834](https://github.com/facebook/jest/pull/7834))
- `[jest-util]`: Migrate to TypeScript ([#7844](https://github.com/facebook/jest/pull/7844))
- `[jest-watcher]`: Migrate to TypeScript ([#7843](https://github.com/facebook/jest/pull/7843))
- `[jest-mock]`: Migrate to TypeScript ([#7847](https://github.com/facebook/jest/pull/7847))

### Performance

Expand Down
4 changes: 4 additions & 0 deletions packages/jest-mock/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@
"engines": {
"node": ">= 6"
},
"dependencies": {
"@jest/types": "^24.1.0"
},
"license": "MIT",
"main": "build/index.js",
thymikee marked this conversation as resolved.
Show resolved Hide resolved
"types": "build/index.d.ts",
"browser": "build-es5/index.js",
"gitHead": "634e5a54f46b2a62d1dc81a170562e6f4e55ad60"
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
*
*/

'use strict';

const vm = require('vm');
import vm from 'vm';

describe('moduleMocker', () => {
let moduleMocker;
Expand Down Expand Up @@ -182,6 +180,7 @@ describe('moduleMocker', () => {
it('mocks ES2015 non-enumerable static properties and methods', () => {
class ClassFoo {
static foo() {}
static fooProp: Function;
}
ClassFoo.fooProp = () => {};

Expand Down
Loading