Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
zachleat committed Nov 15, 2024
1 parent 2e72f80 commit e31de35
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,19 @@ test("Persist parseTarget", async (t) => {
});
});

test("Persist constructor", async (t) => {
test("Persist constructor (no token)", async (t) => {
let p = new Persist();

assert.throws(() => p.setTarget("gitlab:11ty/eleventy"), {
// message: "Invalid persist type: gitlab"
message: "Missing GITHUB_TOKEN environment variable."
});
});

test("Persist constructor (gitlab)", async (t) => {
let p = new Persist();
process.env.GITHUB_TOKEN = "FAKE_TOKEN";

assert.throws(() => p.setTarget("gitlab:11ty/eleventy"), {
message: "Invalid persist type: gitlab"
});
Expand Down

0 comments on commit e31de35

Please sign in to comment.