Skip to content

Commit

Permalink
test(external): update test
Browse files Browse the repository at this point in the history
  • Loading branch information
awlayton committed Jan 27, 2023
1 parent a1be78d commit ba69a5c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"build": "tsc -b",
"start": "node ${INSPECT:-} --enable-source-maps dist/index.js",
"test": "yarn build test && c8 ava",
"test:debug": "ava -T 60m -svc 1 --no-worker-threads",
"test:debug": "ava -T 60m -sv",
"lint": "eslint ."
},
"ava": {
Expand Down
5 changes: 4 additions & 1 deletion test/external.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ import test from 'ava';

import { setTimeout } from 'node:timers/promises';

import moment from 'moment';

import { type OADAClient, connect } from '@oada/client';

import testasn from './testasn.js';
Expand Down Expand Up @@ -55,9 +57,10 @@ test('Should move the ASN when put into staging to same key in asns', async (t)
data: testasn,
});
const postedkey = /^.*\/([^/]+)$/.exec(stagingLocation!)![1]; // Last thing on the content-location
const now = moment().format('YYYY-MM-DD');
await setTimeout(500); // Give it a second to update the parent
const get = conn.get({
path: `/bookmarks/trellisfw/asns/${postedkey}`,
path: `/bookmarks/trellisfw/asns/day-index/${now}/${postedkey}`,
});

t.is(postedkey, asnKey);
Expand Down

0 comments on commit ba69a5c

Please sign in to comment.