mirror of
https://github.com/10h30/odin-javascript-exercises.git
synced 2026-06-05 15:09:09 +09:00
Added jest
This commit is contained in:
+2
-1
@@ -1 +1,2 @@
|
||||
.vscode
|
||||
.vscode
|
||||
node_modules
|
||||
|
||||
@@ -2,4 +2,4 @@ const helloWorld = function() {
|
||||
return ''
|
||||
}
|
||||
|
||||
module.exports = helloWorld
|
||||
module.exports = helloWorld;
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
const { expect } = require('@jest/globals');
|
||||
const helloWorld = require('./helloWorld');
|
||||
|
||||
describe('Hello World', function() {
|
||||
it('says hello world', function() {
|
||||
expect(helloWorld()).toEqual('Hello, World!');
|
||||
});
|
||||
});
|
||||
// describe('Hello World', function() {
|
||||
// it('says hello world', function() {
|
||||
// expect(helloWorld()).toEqual('Hello, World!');
|
||||
// });
|
||||
// });
|
||||
|
||||
test('says "Hello, World!"', () => {
|
||||
expect(helloWorld()).toBe("Hello, World!");
|
||||
});
|
||||
Generated
+9997
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"devDependencies": {
|
||||
"jest": "^26.6.3"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "jest"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user