Skip to content

Commit

Permalink
fixup! feat: push importmap
Browse files Browse the repository at this point in the history
  • Loading branch information
danewalters committed Jun 14, 2024
1 parent c452f67 commit 3c66a72
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
2 changes: 0 additions & 2 deletions src/api/jet/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,6 @@ export async function createProject(
title,
capabilities: [],
instances: [],
imports: undefined,
scopes: undefined,
};
}

Expand Down
2 changes: 0 additions & 2 deletions test/api/jet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,6 @@ export function makeJet(): JetTest {
title,
capabilities: [],
instances: [],
imports: undefined,
scopes: undefined,
});
} else {
reject(new Error(`Project ${name} has already exist.`));
Expand Down
24 changes: 15 additions & 9 deletions test/jcli/config/project-json-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -275,32 +275,38 @@ describe("ProjectDotJSON", () => {
});

it("diff imports", () => {
const initialImports = { "lib": "v1" };
const initialImports = undefined;
const updatedImports = { "lib": "v2" };
const updatedImportsTwo = undefined;
const one = build({ imports: initialImports });
const another = build({ imports: updatedImports });
const diff = one.diff(another);

assertNotEquals(diff, undefined);

console.log("diff", diff);

assertObjectMatch(diff!, {
imports: "v2",
imports: updatedImports,
});

const anotherTwo = build({ imports: updatedImportsTwo });
const diffTwo = one.diff(anotherTwo);
assertEquals(diffTwo.imports, undefined);
});

it.only("diff scopes", () => {
const initialScopes = { "std": { "foo": "bar" } };
const initialScopes = undefined;
const updatedScopes = { "std": { "foo": "foo" } };
const updatedScopesTwo = undefined;

const one = build({ scopes: initialScopes });
const another = build({ scopes: updatedScopes });
const diff = one.diff(another);

assertNotEquals(diff, undefined);
assertObjectMatch(diff!, {
scopes: "foo",
scopes: updatedScopes,
});

const anotherTwo = build({ scopes: updatedScopesTwo });
const diffTwo = one.diff(anotherTwo);
assertEquals(diffTwo.scopes, undefined);
});
});
});

0 comments on commit 3c66a72

Please sign in to comment.