Added jest

This commit is contained in:
Michael Frank
2021-03-03 15:13:24 +13:00
parent 42076e7424
commit b8b23686e3
5 changed files with 10018 additions and 7 deletions
+1 -1
View File
@@ -2,4 +2,4 @@ const helloWorld = function() {
return ''
}
module.exports = helloWorld
module.exports = helloWorld;
+10 -5
View File
@@ -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!");
});