From da8082b1a9dd2f7e42bcbf7daa18cd1229371e68 Mon Sep 17 00:00:00 2001 From: Vishvamsinh Vaghela Date: Thu, 14 Nov 2024 17:31:47 +0530 Subject: [PATCH] test code cov --- scripts/hello.js | 5 +++++ tests/hello.test.js | 8 ++++++++ 2 files changed, 13 insertions(+) create mode 100644 scripts/hello.js create mode 100644 tests/hello.test.js diff --git a/scripts/hello.js b/scripts/hello.js new file mode 100644 index 000000000000..cfddc62e873c --- /dev/null +++ b/scripts/hello.js @@ -0,0 +1,5 @@ +function hello(){ + return "hello" +} + +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..120c74c8114d --- /dev/null +++ b/tests/hello.test.js @@ -0,0 +1,8 @@ +const hello = require("../scripts/hello") + +describe('hello function', () => { + test('should test hello', ()=>{ + let h1 = hello(); + expect(h1).toBe("hello") + }) +});