-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Destroy test environment when test is done and file syncing switched off (fixes #10) #12
Conversation
@@ -210,11 +210,10 @@ module.exports = function createAssert(scope, testCode, settings){ | |||
|
|||
try { | |||
asyncQueue.shift().call(); | |||
__processAsync(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why you move it to try
clause? In that case on call()
exception async queue will never be processed and test never be done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On exception test gets done in __exception
call in catch
block . If call __processAsync()
after try/catch
clause testDone
is called twice.
this.createScope_ = null; | ||
this.scopes.forEach(function(scope){ | ||
scope.destroy(); | ||
}); | ||
this.scopes = null; | ||
|
||
if (this.html) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just this.html = null
? I think if
is redundant here
} | ||
}); | ||
fileSync.link(null, function(value){ | ||
doneTestCasesAndSuites.source.setSource(value ? null : testsToRun); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
source: new Extract({
source: fileSync.as(function(value){
return value ? null : testsToRun;
}),
rule: function(test){
return test.parentNode || test;
}
}),
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will end up with codestyle error, because doneTestCasesAndSuites
defined but not used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use variable then
@@ -24,7 +24,7 @@ function findTest(test, filename){ | |||
} | |||
} | |||
|
|||
function loadTests(data, autorun, notifyLoaderFunction){ | |||
function loadTests(data, autorun, fileSync, notifyLoaderFunction){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think new argument should be appended, since notifyLoaderFunction
may using by some one.
No description provided.