Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 9428e59

Browse files
[MOD] turbo cmd: add basic unit test
1 parent 2753356 commit 9428e59

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

‎test/turbo.spec.js‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
const turbo = require('../bin/turbo');
2+
3+
jest.mock('commander', () => {
4+
const mock = jest.genMockFromModule('commander');
5+
6+
mock.command = () => {
7+
return mock;
8+
};
9+
mock.version = () => {
10+
return mock;
11+
};
12+
13+
return mock;
14+
});
15+
16+
describe('turbo', () => {
17+
'use strict';
18+
it('should return an object', () => {
19+
expect(typeof turbo).toBe('object');
20+
});
21+
});

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /