inital
This commit is contained in:
1
node_modules/@11ty/dependency-tree-esm/test/stubs/circular-child.js
generated
vendored
Normal file
1
node_modules/@11ty/dependency-tree-esm/test/stubs/circular-child.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import "./circular-parent.js";
|
1
node_modules/@11ty/dependency-tree-esm/test/stubs/circular-parent.js
generated
vendored
Normal file
1
node_modules/@11ty/dependency-tree-esm/test/stubs/circular-parent.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import "./circular-child.js";
|
2
node_modules/@11ty/dependency-tree-esm/test/stubs/circular-self.js
generated
vendored
Normal file
2
node_modules/@11ty/dependency-tree-esm/test/stubs/circular-self.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import "./circular-self.js";
|
||||
import "./empty.js";
|
0
node_modules/@11ty/dependency-tree-esm/test/stubs/empty.js
generated
vendored
Normal file
0
node_modules/@11ty/dependency-tree-esm/test/stubs/empty.js
generated
vendored
Normal file
2
node_modules/@11ty/dependency-tree-esm/test/stubs/file.js
generated
vendored
Normal file
2
node_modules/@11ty/dependency-tree-esm/test/stubs/file.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
import fs from "fs";
|
||||
import * as fdklsjf from "./imported-secondary.js";
|
3
node_modules/@11ty/dependency-tree-esm/test/stubs/imported-secondary.js
generated
vendored
Normal file
3
node_modules/@11ty/dependency-tree-esm/test/stubs/imported-secondary.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import "fs";
|
||||
|
||||
export function hello() {}
|
3
node_modules/@11ty/dependency-tree-esm/test/stubs/imported.js
generated
vendored
Normal file
3
node_modules/@11ty/dependency-tree-esm/test/stubs/imported.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
import * as fdklsjf from "./imported-secondary.js";
|
||||
|
||||
export function hello() {}
|
1
node_modules/@11ty/dependency-tree-esm/test/stubs/nested-grandchild.js
generated
vendored
Normal file
1
node_modules/@11ty/dependency-tree-esm/test/stubs/nested-grandchild.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
import * as fdklsjf from "./nested.js";
|
2
node_modules/@11ty/dependency-tree-esm/test/stubs/nested.js
generated
vendored
Normal file
2
node_modules/@11ty/dependency-tree-esm/test/stubs/nested.js
generated
vendored
Normal 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
30
node_modules/@11ty/dependency-tree-esm/test/test.js
generated
vendored
Normal 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("Doesn’t 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"]);
|
||||
});
|
Reference in New Issue
Block a user