From eae873344dfc1a13a13342db88d4d6be4e7d2cf3 Mon Sep 17 00:00:00 2001 From: mpsido Date: Mon, 12 Feb 2018 15:34:48 +0800 Subject: [PATCH] Setting up empty automatic using jest --- package.json | 6 +++++- test/hello.test.js | 8 ++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 test/hello.test.js diff --git a/package.json b/package.json index 32b1a89..ebf7da7 100644 --- a/package.json +++ b/package.json @@ -30,6 +30,10 @@ "eslint": "^4.6.1", "eslint-config-airbnb-base": "^12.0.0", "eslint-plugin-import": "^2.7.0", + "jest": "^22.2.2", "pre-commit": "^1.2.2" - } + }, + "scripts": { + "test": "jest" + } } diff --git a/test/hello.test.js b/test/hello.test.js new file mode 100644 index 0000000..a9c9730 --- /dev/null +++ b/test/hello.test.js @@ -0,0 +1,8 @@ +const spreadsheet = require('../googleSpreadsheet'); + +function sum(a, b) { + return a + b; +} +test('test rowToObject', () => { + expect(sum(1, 2)).toBe(3); +});