Skip to content

Commit

Permalink
tests(Similar Folder): Add a test for similar folder names when searc…
Browse files Browse the repository at this point in the history
…hing for a file (should fail currently)
  • Loading branch information
EntraptaJ committed May 12, 2020
1 parent 4c66dfc commit d7d4462
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions Testing/Tests/SimilarFindFileFolder/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This tests if the findFiles folder detection takes into account non exact folder names when the expected file is part of the name of the folder.
5 changes: 5 additions & 0 deletions Testing/Tests/SimilarFindFileFolder/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions Testing/Tests/SimilarFindFileFolder/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"name": "test-similar-find-files-folder",
"version": "0.0.0",
"description": "",
"main": "src/index.ts",
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC"
}
2 changes: 2 additions & 0 deletions Testing/Tests/SimilarFindFileFolder/src/Library/React.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// SimilarFindFileFolder/src/Library/React.ts
export const helloWorld = 'helloWorld';
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
// SimilarFindFileFolder/src/Library/ReactFlight/index.ts
export async function stuff(): Promise<'reactFlight'> {
console.log(`I'm react Flight`);

return 'reactFlight';
}
8 changes: 8 additions & 0 deletions Testing/Tests/SimilarFindFileFolder/src/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Template/src/index.ts
import assert from 'assert';
import * as React from './Library/React';
import { stuff } from './Library/ReactFlight';

assert.equal(React.helloWorld, 'helloWorld');

stuff().then((result) => assert.equal(result, 'reactFlight'));
8 changes: 8 additions & 0 deletions Testing/Tests/SimilarFindFileFolder/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "Node",
"allowSyntheticDefaultImports": true
}
}

0 comments on commit d7d4462

Please sign in to comment.