Skip to content

Commit

Permalink
env
Browse files Browse the repository at this point in the history
  • Loading branch information
Leif Shackelford committed May 31, 2022
1 parent 64ded3a commit f9b1cb7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@cannabis-labeling-api/fetch",
"private": false,
"description": "fetch QR details from a compliant Cannabis Labeling endpoint",
"version": "0.1.2",
"version": "0.1.3",
"homepage": "https://github.com/cannabis-labeling-api/fetch",
"author": "Leif Shackelford <[email protected]>",
"engines": {
Expand Down
16 changes: 8 additions & 8 deletions test/endpoints.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe('Test', async () => {
assert.equal(epInfo.endpoint, env.endpoint)
});

it('created fixtures', async () => {
it('creates fixtures', async () => {
const res = await uapiFetch({
apiKey: env.apiKey,
uri: `${env.endpoint}/fixtures/create`,
Expand All @@ -63,21 +63,22 @@ describe('Test', async () => {
});
const body = await res.json();
const { added } = body;
// assert.exists(added, 'add fixtures expected fixtures');
fixtures.results.added = added;
console.log("created fixures", added, "wait to settle");
// console.log("created fixures", added, "wait to settle");
await sleep(1500);
});

it('gets cases and eaches via fixture ID', async () => {
it(`gets cases and eaches via fixture ID: ${testFixtures.id}`, async () => {
await sleep(1500);
const res = await uapiFetch({
apiKey: env.apiKey,
uri: `${env.endpoint}/regulator/${testFixtures.id}`,
});
const { cases, eaches } = await res.json();
// console.log({ cases, eaches })
assert.notEqual(cases?.length, 0, "no cases");
assert.notEqual(eaches?.length, 0, "no caeacheses");
assert.ok(cases?.length, "no cases");
assert.ok(eaches?.length, "no eaches");
fixtures.cases = cases;
fixtures.eaches = eaches;
});
Expand Down Expand Up @@ -113,10 +114,9 @@ describe('Test', async () => {
});
const body = await res.json();
const { removed } = body;
console.log("removed", removed)
fixtures.results.removed = removed;
assert.notEqual(removed?.branches?.length, 0);
assert.notEqual(removed?.softCodes?.length, 0);
assert.ok(removed?.branches?.length);
assert.ok(removed?.softCodes?.length);
});
});

Expand Down
File renamed without changes.

0 comments on commit f9b1cb7

Please sign in to comment.