Skip to content

Commit

Permalink
add allow-arbitrary-extensions e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
stepankuzmin committed Apr 15, 2024
1 parent b191872 commit d63c8c0
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/e2e/test-cases/allow-arbitrary-extensions/config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { TestCaseConfig } from '../../test-cases/test-case-config';

const config: TestCaseConfig = {};

export = config;
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
declare const hello: Record<any, any>;

export default hello;
3 changes: 3 additions & 0 deletions tests/e2e/test-cases/allow-arbitrary-extensions/hello.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"test": 1
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
require('../run-test-case').runTestCase(__dirname);
5 changes: 5 additions & 0 deletions tests/e2e/test-cases/allow-arbitrary-extensions/input.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import hello from "./hello.json";

export function test() {
return hello
}
3 changes: 3 additions & 0 deletions tests/e2e/test-cases/allow-arbitrary-extensions/output.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export declare function test(): Record<any, any>;

export {};
9 changes: 9 additions & 0 deletions tests/e2e/test-cases/allow-arbitrary-extensions/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "../tsconfig.json",
"compilerOptions": {
"allowJs": true,
"allowArbitraryExtensions": true,
"esModuleInterop": true,
"resolveJsonModule": true
}
}

0 comments on commit d63c8c0

Please sign in to comment.