file from another directory test

This commit is contained in:
Dylan Conway
2023-04-07 15:29:23 -07:00
parent 8b404bdd90
commit 653e2ecd2a
2 changed files with 4 additions and 2 deletions

View File

View File

@@ -1,7 +1,8 @@
import { expect, test } from "bun:test";
import { resolve, join } from "path";
import MyPNG from "./test-png.png";
import theData from "./data.anything";
import data from "./data.anything";
import moreData from "../more-data.any";
import js from "./no-extension-js";
test("png import", () => {
@@ -9,6 +10,7 @@ test("png import", () => {
});
test("random import", () => {
expect(theData).toBe(join(import.meta.dir, "data.anything"));
expect(data).toBe(join(import.meta.dir, "data.anything"));
expect(moreData).toBe(join(import.meta.dir, "../more-data.any"));
expect(js()).toBe("success!");
});