diff --git a/.gitignore b/.gitignore index a16ddd6..e1a2b42 100644 --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,5 @@ artifacts/ npm-debug.log .DS_STORE .*.swp -.nyc_output \ No newline at end of file +.nyc_output +package-lock.json diff --git a/index.js b/index.js index 898151f..5c0725f 100644 --- a/index.js +++ b/index.js @@ -17,8 +17,7 @@ class ArtifactBookend extends BookendInterface { constructor(storeUrl) { super(); this.storeUrl = storeUrl; - this.teardownCommands = COMMANDS - .replace(new RegExp('\\$ARTIFACTS_DIR_SUFFIX', 'g'), ARTIFACTS_DIR_SUFFIX) + this.teardownCommands = COMMANDS.replace(new RegExp('\\$ARTIFACTS_DIR_SUFFIX', 'g'), ARTIFACTS_DIR_SUFFIX) .replace(new RegExp('\\$STORE_URL', 'g'), storeUrl) .split('\n'); } diff --git a/package.json b/package.json index ac85a12..f756b6f 100644 --- a/package.json +++ b/package.json @@ -30,16 +30,16 @@ "Tiffany Kyi " ], "devDependencies": { - "chai": "^4.2.0", - "eslint": "^4.19.1", - "eslint-config-screwdriver": "^3.0.1", + "chai": "^4.3.4", + "eslint": "^7.5.0", + "eslint-config-screwdriver": "^5.0.1", + "mocha": "^8.2.1", "mocha-multi-reporters": "^1.5.1", "mocha-sonarqube-reporter": "^1.0.2", - "nyc": "^15.0.0", - "mocha": "^8.2.1" + "nyc": "^15.0.0" }, "dependencies": { - "screwdriver-build-bookend": "^2.1.1" + "screwdriver-build-bookend": "^2.3.3" }, "release": { "debug": false, diff --git a/test/index.test.js b/test/index.test.js index 6612429..c4bc5bc 100644 --- a/test/index.test.js +++ b/test/index.test.js @@ -1,12 +1,11 @@ /* Inline JSHint configuration for Mocha globals. */ -/* global describe, it, beforeEach */ // All Mocha globals. 'use strict'; -const assert = require('chai').assert; -const ArtifactBookend = require('..'); +const { assert } = require('chai'); const fs = require('fs'); const path = require('path'); +const ArtifactBookend = require('..'); describe('index test', () => { let bookend; @@ -25,14 +24,11 @@ describe('index test', () => { const commandsPath = path.resolve(__dirname, './data/commands.txt'); const commands = fs.readFileSync(commandsPath, 'utf8').replace('\n', ''); - return bookend.getTeardownCommand().then(result => - assert.deepEqual(result, commands) - ); + return bookend.getTeardownCommand().then(result => assert.deepEqual(result, commands)); }); it('getSetupCommand', () => - bookend.getSetupCommand().then((result) => { + bookend.getSetupCommand().then(result => { assert.strictEqual(result, ''); - }) - ); + })); });