Skip to content

Commit

Permalink
fix($error): Display test name in the error with the test not being i…
Browse files Browse the repository at this point in the history
…nitialized yet
  • Loading branch information
Eduard Kyvenko committed Jul 10, 2017
1 parent 3bc46c9 commit 792d8e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ export function initialize(): void {

function validateInitialized(test: SplitTest) {
if (!test.isInitialized) {
throw new Error('Skift: Test not initialized yet!');
throw new Error(`Skift: Test "${test.name}" is not initialized yet!`);
}
}
function validateTestName(testName: string) {
if (!getTest(testName)) {
throw new Error(`Skift: Unknown test '${testName}"`);
throw new Error(`Skift: Unknown test "${testName}"`);
}
}

Expand Down

0 comments on commit 792d8e4

Please sign in to comment.