This commit is contained in:
2024-11-03 17:16:20 +01:00
commit fd6412d6f2
8090 changed files with 778406 additions and 0 deletions

View File

@@ -0,0 +1 @@
import "./circular-parent.js";

View File

@@ -0,0 +1 @@
import "./circular-child.js";

View File

@@ -0,0 +1,2 @@
import "./circular-self.js";
import "./empty.js";

View File

View File

@@ -0,0 +1,2 @@
import fs from "fs";
import * as fdklsjf from "./imported-secondary.js";

View File

@@ -0,0 +1,3 @@
import "fs";
export function hello() {}

View File

@@ -0,0 +1,3 @@
import * as fdklsjf from "./imported-secondary.js";
export function hello() {}

View File

@@ -0,0 +1 @@
import * as fdklsjf from "./nested.js";

View File

@@ -0,0 +1,2 @@
import fs from "fs";
import * as fdklsjf from "./imported.js";

30
node_modules/@11ty/dependency-tree-esm/test/test.js generated vendored Normal file
View File

@@ -0,0 +1,30 @@
const test = require("ava");
const { find } = require("../main.js");
test("Empty", async t => {
t.deepEqual(await find("./test/stubs/empty.js"), []);
});
test("Doesnt exist", async t => {
t.deepEqual(await find("./test/stubs/THIS_FILE_DOES_NOT_EXIST.js"), []);
});
test("Simple", async t => {
t.deepEqual(await find("./test/stubs/file.js"), ["./test/stubs/imported-secondary.js"]);
});
test("Nested two deep", async t => {
t.deepEqual(await find("./test/stubs/nested.js"), ["./test/stubs/imported.js", "./test/stubs/imported-secondary.js"]);
});
test("Nested three deep", async t => {
t.deepEqual(await find("./test/stubs/nested-grandchild.js"), ["./test/stubs/nested.js", "./test/stubs/imported.js", "./test/stubs/imported-secondary.js"]);
});
test("Circular", async t => {
t.deepEqual(await find("./test/stubs/circular-parent.js"), ["./test/stubs/circular-child.js"]);
});
test("Circular Self Reference", async t => {
t.deepEqual(await find("./test/stubs/circular-self.js"), ["./test/stubs/empty.js"]);
});