Skip to content

Commit

Permalink
fix: Run code under test TDE-968 (#779)
Browse files Browse the repository at this point in the history
#### Motivation

The original code just asserted that we were able to create an anonymous
function to call the function under test, and didn't actually run the
function.

#### Checklist

- [x] Tests updated
- [ ] Docs updated (N/A)
- [x] Issue linked in Title
  • Loading branch information
l0b0 authored Nov 29, 2023
1 parent cd7d938 commit 9d4563f
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/commands/lint/__test__/lint.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { describe, it } from 'node:test';

import { lintImageryPath, lintPath } from '../lint.s3.paths.js';

describe('lintImageryPaths', () => {
describe('lintPath', () => {
it('Should Fail - Incorrect Bucket Name', () => {
assert.throws(() => {
lintPath('s3://n-imagery/auckland/auckland_2012_0.075m/rgb/2193/');
Expand All @@ -20,9 +20,7 @@ describe('lintImageryPaths', () => {
}, Error('Too many keys in Path: /auckland/auckland_2012_0.075m/rgb/2193/extra-args/'));
});
it('Should Pass', () => {
assert.ok(() => {
lintPath('s3://nz-imagery/auckland/auckland_2012_0.075m/rgb/2193/');
});
lintPath('s3://nz-imagery/auckland/auckland_2012_0.075m/rgb/2193/');
});
});

Expand All @@ -48,8 +46,6 @@ describe('lintImageryPaths', () => {
}, Error('Trailing 0 in resolution of dataset name: auckland_2020_0.20m'));
});
it('Should Pass', () => {
assert.ok(() => {
lintImageryPath('/auckland/auckland_2020_0.2m/rgb/2193/');
});
lintImageryPath('/auckland/auckland_2020_0.2m/rgb/2193/');
});
});

0 comments on commit 9d4563f

Please sign in to comment.