diff --git a/scripts/hello.js b/scripts/hello.js new file mode 100644 index 000000000000..959daa58e4fc --- /dev/null +++ b/scripts/hello.js @@ -0,0 +1,5 @@ +function hello(name){ + return "hello" + name +} + +module.exports = hello \ No newline at end of file diff --git a/tests/hello.test.js b/tests/hello.test.js new file mode 100644 index 000000000000..a29e8a5dae56 --- /dev/null +++ b/tests/hello.test.js @@ -0,0 +1,9 @@ +const { describe } = require('node:test') +const hello = require('../scripts/hello') + +describe('hello test', () => { + test('should check hello function', () => { + let x = hello("mike") + expect(x).toContain("mike") + }) +})