Skip to content

Commit 7714953

Browse files
committed
add test case
1 parent 0331322 commit 7714953

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
it("should be possible to import an absolute path", () => {
2+
require(__filename);
3+
});
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
module.exports = {
2+
resolve: {
3+
plugins: [
4+
{
5+
apply(resolver) {
6+
resolver.hooks.file.tap("Test", (request, resolverContext) => {
7+
if (/test.configCases.*test.configCases/.test(request.path))
8+
throw new Error("Trying to resolve outside of test cases");
9+
});
10+
}
11+
}
12+
]
13+
}
14+
};

0 commit comments

Comments
 (0)