From c012f7a186c8294df892924c85bce1c115d13b98 Mon Sep 17 00:00:00 2001 From: Ava Gaiety Wroten Date: Mon, 21 Sep 2020 22:53:09 +0000 Subject: [PATCH 1/2] Update .gitlab-ci.yml --- .gitlab-ci.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..64e5edc --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,15 @@ +# This file is a template, and might need editing before it works on your project. +# Official framework image. Look for the different tagged releases at: +# https://hub.docker.com/r/library/node/tags/ +image: node:latest + +# This folder is cached between builds +# http://docs.gitlab.com/ce/ci/yaml/README.html#cache +cache: + paths: + - node_modules/ + +test_async: + script: + - npm install + - node run test -- 2.45.3 From 028213e6ac30d5a31f2cf7aea88c56a2b6df1dfe Mon Sep 17 00:00:00 2001 From: Ava Gaiety Wroten Date: Mon, 21 Sep 2020 18:14:11 -0500 Subject: [PATCH 2/2] Proper JSON import for test --- index.test.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.test.js b/index.test.js index 38f4bd9..6048bbb 100644 --- a/index.test.js +++ b/index.test.js @@ -1,5 +1,7 @@ const Query = require('./index') -const TestData = require('./testdata.json') +const fs = require('fs') + +const TestData = JSON.parse(fs.readFileSync('./testdata.json')) test('should not modify passed data without chain alterations', () => { let query = new Query(TestData) -- 2.45.3