From 9906956d655de870448ffc2605d06dae00dc1bcd Mon Sep 17 00:00:00 2001 From: William Killerud Date: Fri, 15 Nov 2024 12:25:57 +0100 Subject: [PATCH] test: use platform in directory name To rule out the runner matrix causing problems --- slug.js | 6 ++++++ test/main.js | 7 ++++++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 slug.js diff --git a/slug.js b/slug.js new file mode 100644 index 0000000..e861279 --- /dev/null +++ b/slug.js @@ -0,0 +1,6 @@ +import uniqueSlug from "unique-slug"; +function slug() { + return uniqueSlug(); +} + +console.log(slug()); diff --git a/test/main.js b/test/main.js index 0adde8f..268bd24 100644 --- a/test/main.js +++ b/test/main.js @@ -1,13 +1,18 @@ /* eslint-disable no-empty */ import { Writable, pipeline } from "node:stream"; +import os from "node:os"; import { stream } from "@eik/common"; -import slug from "unique-slug"; +import uniqueSlug from "unique-slug"; import tap from "tap"; import fs from "node:fs"; import Sink from "../lib/main.js"; +function slug() { + return `${os.platform()}/${uniqueSlug()}`; +} + // Ignore the value for "timestamp" field in the snapshots tap.cleanSnapshot = (s) => { const regex = /"timestamp": [0-9.]+,/gi;