Added jest
This commit is contained in:
parent
42076e7424
commit
b8b23686e3
5 changed files with 10018 additions and 7 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1 +1,2 @@
|
||||||
.vscode
|
.vscode
|
||||||
|
node_modules
|
||||||
|
|
|
@ -2,4 +2,4 @@ const helloWorld = function() {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = helloWorld
|
module.exports = helloWorld;
|
||||||
|
|
|
@ -1,7 +1,12 @@
|
||||||
|
const { expect } = require('@jest/globals');
|
||||||
const helloWorld = require('./helloWorld');
|
const helloWorld = require('./helloWorld');
|
||||||
|
|
||||||
describe('Hello World', function() {
|
// describe('Hello World', function() {
|
||||||
it('says hello world', function() {
|
// it('says hello world', function() {
|
||||||
expect(helloWorld()).toEqual('Hello, World!');
|
// expect(helloWorld()).toEqual('Hello, World!');
|
||||||
});
|
// });
|
||||||
});
|
// });
|
||||||
|
|
||||||
|
test('says "Hello, World!"', () => {
|
||||||
|
expect(helloWorld()).toBe("Hello, World!");
|
||||||
|
});
|
9997
package-lock.json
generated
Normal file
9997
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load diff
8
package.json
Normal file
8
package.json
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"devDependencies": {
|
||||||
|
"jest": "^26.6.3"
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"test": "jest"
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in a new issue