Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linting fixes #79

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions scripts/__test__/parse_dependency_updates.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,32 @@ import {
extractDependencyUpdatesFromList,
isUpdate,
fromString,
getAllUpdates,
getAllUpdates
} from '../parse-dependency-updates';

const multipleUpdatesRequired = [
'/usr/local/Cellar/node/13.10.1/bin/node',
'/Users/someone/git/prm-deductions-component-template/check_for_updates.js',
'/Users/someone/git/prm-deductions-component-template:[email protected]:[email protected]:[email protected]',
'/Users/someone/git/prm-deductions-component-template:[email protected]:[email protected]:[email protected]',
'/Users/someone/git/prm-deductions-component-template:[email protected]:[email protected]:[email protected]'
];

const testData = [
'/usr/local/Cellar/node/13.10.1/bin/node',
'/Users/someone/git/prm-deductions-component-template/check_for_updates.js',
'/Users/someone/git/prm-deductions-component-template:[email protected]:[email protected]:[email protected]',
'/Users/someone/git/prm-deductions-component-template:[email protected]:[email protected]:[email protected]'
];

const noUpdatesRequired = [
'/usr/local/Cellar/node/13.10.1/bin/node',
'/Users/someone/git/prm-deductions-component-template/check_for_updates.js',
'/Users/someone/git/prm-deductions-component-template/check_for_updates.js'
];

describe('parse_dependency_updates.js', () => {
describe('extractDependencyUpdatesFromList', () => {
it('should filter the list to just dependency updates', () => {
expect(extractDependencyUpdatesFromList(testData)).toEqual([
'/Users/someone/git/prm-deductions-component-template:[email protected]:[email protected]:[email protected]',
'/Users/someone/git/prm-deductions-component-template:[email protected]:[email protected]:[email protected]'
]);
});

Expand Down Expand Up @@ -60,7 +60,7 @@ describe('parse_dependency_updates.js', () => {
package: 'uuid',
currentVersion: '3.4.0',
wantedVersion: '7.0.2',
latestVersion: '7.0.2',
latestVersion: '7.0.2'
});
});
});
Expand All @@ -72,14 +72,14 @@ describe('parse_dependency_updates.js', () => {
package: 'uuid',
currentVersion: '3.4.0',
wantedVersion: '7.0.2',
latestVersion: '7.0.2',
latestVersion: '7.0.2'
},
{
package: 'ppc',
currentVersion: '3.4.0',
wantedVersion: '5.0.2',
latestVersion: '7.0.2',
},
latestVersion: '7.0.2'
}
]);
});
});
Expand Down
4 changes: 2 additions & 2 deletions scripts/parse-dependency-updates.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const fromString = (updateString) => {
package: matcher[1],
wantedVersion: matcher[2],
currentVersion: matcher[3],
latestVersion: matcher[4],
latestVersion: matcher[4]
};
};

Expand All @@ -36,7 +36,7 @@ module.exports = {
isUpdate,
fromString,
getAllUpdates,
getAllUpdatesText,
getAllUpdatesText
};

console.log(getAllUpdates(process.argv));
4 changes: 2 additions & 2 deletions scripts/wait-for-localstack.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@ const isConnected = () => {
accessKeyId: 'test-access-key',
secretAccessKey: 'test-secret-key',
endpoint: new Endpoint(process.env.LOCALSTACK_URL),
s3ForcePathStyle: true,
s3ForcePathStyle: true
});

s3.headBucket(
{
Bucket: process.env.S3_BUCKET_NAME,
Bucket: process.env.S3_BUCKET_NAME
},
(err) => {
if (err) resolve(false);
Expand Down
2 changes: 1 addition & 1 deletion src/__builders__/logging-helper.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const transportSpy = {
log: jest.fn(),
on: jest.fn(),
on: jest.fn()
};

export const expectStructuredLogToContain = (spy, expectedStructure) => {
Expand Down
Loading
Loading