Skip to content

Commit

Permalink
feat(2492): Update to eslint-config-screwdriver v5 (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
tkyi authored Jul 9, 2021
1 parent 6c86736 commit 49db643
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 18 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ artifacts/
npm-debug.log
.DS_STORE
.*.swp
.nyc_output
.nyc_output
package-lock.json
3 changes: 1 addition & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
}
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,16 @@
"Tiffany Kyi <tiffanykyi@gmail.com>"
],
"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,
Expand Down
14 changes: 5 additions & 9 deletions test/index.test.js
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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, '');
})
);
}));
});

0 comments on commit 49db643

Please sign in to comment.