Update README with Jest specific language. Update some spec files with new syntax

This commit is contained in:
Michael Frank
2021-03-04 10:42:39 +13:00
parent 91d50288b2
commit e73c68fc01
5 changed files with 28 additions and 22 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
const helloWorld = function() {
return ''
return 'Yello Wold!'
}
module.exports = helloWorld;
+5 -3
View File
@@ -1,4 +1,4 @@
const expect = require('expect');const { expect } = require('@jest/globals');
const expect = require('expect');
const helloWorld = require('./helloWorld');
// describe('Hello World', function() {
@@ -7,6 +7,8 @@ const helloWorld = require('./helloWorld');
// });
// });
test('says "Hello, World!"', () => {
expect(helloWorld()).toBe("Hello, World!");
describe('helloWorld', function() {
test('says "Hello, World!"', function() {
expect(helloWorld()).toBe("Hello, World!");
})
});