Skip to content

Commit

Permalink
Skip install with freeze tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JayaKrishnaNamburu committed Dec 22, 2023
1 parent 46314f8 commit 868bea5
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions test/freeze.test.skip.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import assert from "assert";
import { type Scenario, runScenarios } from "./scenarios";

const importMap = new Map([
[
"importmap.json",
JSON.stringify({
imports: {
fs: "https://ga.jspm.io/npm:@jspm/core@2.0.0-beta.20/nodelibs/node/fs.js",
},
}),
],
]);

const scenarios: Scenario[] = [
// Installing without freeze should bump the version of core:
{
files: importMap,
commands: ["jspm install node:process"],
validationFn: async (files: Map<string, string>) => {
const map = JSON.parse(files.get("importmap.json"));
assert(!map.imports.fs.includes("2.0.0-beta.20"));
assert(!map.imports.process.includes("2.0.0-beta.20"));
},
},

// Installing with freeze should keep it fixed:
{
files: importMap,
commands: ["jspm install node:process --freeze"],
validationFn: async (files: Map<string, string>) => {
const map = JSON.parse(files.get("importmap.json"));
assert(map.imports.fs.includes("2.0.0-beta.20"));
assert(map.imports.process.includes("2.0.0-beta.20"));
},
},
];

runScenarios(scenarios);

0 comments on commit 868bea5

Please sign in to comment.