forked from microsoft/tsyringe
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix better error messages for circular dependencies (microsoft#42) (m…
…icrosoft#90) * Fix better error messages for circular dependencies (microsoft#42) Ignore test cases folder. * Rename imports folder to fixtures * Code review fix typo in error message * Move errorMatch helper to __tests__/utils scope. * Fix tests after typo
- Loading branch information
1 parent
75f769d
commit 3f8b9e2
Showing
6 changed files
with
48 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import {B01} from "./01-test-case-B01-injects-A01"; | ||
import {injectable} from "../../decorators"; | ||
|
||
@injectable() | ||
export class A01 { | ||
constructor(public b: B01) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import {A01} from "./01-test-case-A01-injects-B01"; | ||
import {injectable} from "../../decorators"; | ||
|
||
@injectable() | ||
export class B01 { | ||
constructor(public a: A01) {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export default function errorMatch(lines: RegExp[]): RegExp { | ||
return new RegExp(lines.map(x => x.source).join("\\s+")); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters