dwf/rva: started suite testing.
This commit is contained in:
parent
7a95f3344c
commit
be33f1e6d4
43
jasmine.iws
43
jasmine.iws
|
@ -89,10 +89,10 @@
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
</file>
|
</file>
|
||||||
<file leaf-file-name="bootstrap.js" pinned="false" current="true" current-in-tab="true">
|
<file leaf-file-name="bootstrap.js" pinned="false" current="false" current-in-tab="false">
|
||||||
<entry file="file://$PROJECT_DIR$/test/bootstrap.js">
|
<entry file="file://$PROJECT_DIR$/test/bootstrap.js">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state line="239" column="43" selection-start="6804" selection-end="6804" vertical-scroll-proportion="0.28954938">
|
<state line="295" column="2" selection-start="8248" selection-end="8248" vertical-scroll-proportion="0.4717162">
|
||||||
<folding />
|
<folding />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
|
@ -107,10 +107,10 @@
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
</file>
|
</file>
|
||||||
<file leaf-file-name="jasmine.js" pinned="false" current="false" current-in-tab="false">
|
<file leaf-file-name="jasmine.js" pinned="false" current="true" current-in-tab="true">
|
||||||
<entry file="file://$PROJECT_DIR$/lib/jasmine.js">
|
<entry file="file://$PROJECT_DIR$/lib/jasmine.js">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state line="88" column="0" selection-start="2048" selection-end="2048" vertical-scroll-proportion="0.2422179">
|
<state line="131" column="32" selection-start="2951" selection-end="2951" vertical-scroll-proportion="0.29766536">
|
||||||
<folding />
|
<folding />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
|
@ -224,6 +224,28 @@
|
||||||
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||||
</PATH_ELEMENT>
|
</PATH_ELEMENT>
|
||||||
</PATH>
|
</PATH>
|
||||||
|
<PATH>
|
||||||
|
<PATH_ELEMENT>
|
||||||
|
<option name="myItemId" value="jasmine" />
|
||||||
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
||||||
|
</PATH_ELEMENT>
|
||||||
|
<PATH_ELEMENT>
|
||||||
|
<option name="myItemId" value="jasmine" />
|
||||||
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewModuleNode" />
|
||||||
|
</PATH_ELEMENT>
|
||||||
|
<PATH_ELEMENT>
|
||||||
|
<option name="myItemId" value="PsiDirectory:/Users/pivotal/Desktop/jasmine" />
|
||||||
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||||
|
</PATH_ELEMENT>
|
||||||
|
<PATH_ELEMENT>
|
||||||
|
<option name="myItemId" value="PsiDirectory:/Users/pivotal/Desktop/jasmine/jspec" />
|
||||||
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||||
|
</PATH_ELEMENT>
|
||||||
|
<PATH_ELEMENT>
|
||||||
|
<option name="myItemId" value="PsiDirectory:/Users/pivotal/Desktop/jasmine/jspec/test" />
|
||||||
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
||||||
|
</PATH_ELEMENT>
|
||||||
|
</PATH>
|
||||||
<PATH>
|
<PATH>
|
||||||
<PATH_ELEMENT>
|
<PATH_ELEMENT>
|
||||||
<option name="myItemId" value="jasmine" />
|
<option name="myItemId" value="jasmine" />
|
||||||
|
@ -532,16 +554,23 @@
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/lib/jasmine.js">
|
<entry file="file://$PROJECT_DIR$/jspec/test/test.js">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state line="88" column="0" selection-start="2048" selection-end="2048" vertical-scroll-proportion="0.2422179">
|
<state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
|
||||||
<folding />
|
<folding />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
</entry>
|
</entry>
|
||||||
<entry file="file://$PROJECT_DIR$/test/bootstrap.js">
|
<entry file="file://$PROJECT_DIR$/test/bootstrap.js">
|
||||||
<provider selected="true" editor-type-id="text-editor">
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
<state line="239" column="43" selection-start="6804" selection-end="6804" vertical-scroll-proportion="0.28954938">
|
<state line="295" column="2" selection-start="8248" selection-end="8248" vertical-scroll-proportion="0.4717162">
|
||||||
|
<folding />
|
||||||
|
</state>
|
||||||
|
</provider>
|
||||||
|
</entry>
|
||||||
|
<entry file="file://$PROJECT_DIR$/lib/jasmine.js">
|
||||||
|
<provider selected="true" editor-type-id="text-editor">
|
||||||
|
<state line="131" column="32" selection-start="2951" selection-end="2951" vertical-scroll-proportion="0.29766536">
|
||||||
<folding />
|
<folding />
|
||||||
</state>
|
</state>
|
||||||
</provider>
|
</provider>
|
||||||
|
|
|
@ -123,17 +123,31 @@ var it = function (description) {
|
||||||
}
|
}
|
||||||
|
|
||||||
that.resetTimeout();
|
that.resetTimeout();
|
||||||
|
|
||||||
return that;
|
return that;
|
||||||
}
|
}
|
||||||
|
|
||||||
that.runs = addToQueue;
|
that.runs = addToQueue;
|
||||||
that.then = addToQueue;
|
that.then = addToQueue;
|
||||||
|
|
||||||
|
currentSuite.tests.push(that);
|
||||||
|
|
||||||
|
|
||||||
return that;
|
return that;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var currentSuite;
|
||||||
|
|
||||||
|
var describe = function (description, tests) {
|
||||||
|
var that = {
|
||||||
|
description: description,
|
||||||
|
tests: []
|
||||||
|
}
|
||||||
|
currentSuite = that;
|
||||||
|
tests();
|
||||||
|
return that;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Jasmine constructor
|
* Jasmine constructor
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -282,23 +282,37 @@ var waitForDone = function(spec, mockSuite) {
|
||||||
}, 150);
|
}, 150);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var testSuites = function () {
|
||||||
|
|
||||||
|
// suite has a description
|
||||||
|
var suite = describe('one suite description', function() {});
|
||||||
|
reporter.test((suite.description == 'one suite description'),
|
||||||
|
'Suite did not get a description');
|
||||||
|
|
||||||
|
// suite can have a test
|
||||||
|
suite = describe('one suite description', function () {
|
||||||
|
it('should be a test');
|
||||||
|
});
|
||||||
|
|
||||||
|
reporter.test((suite.tests[0].queue.length === 1),
|
||||||
|
'Suite did not get a test pushed');
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
var runTests = function () {
|
var runTests = function () {
|
||||||
$('spinner').show();
|
$('spinner').show();
|
||||||
|
|
||||||
testMatchersComparisons();
|
// testMatchersComparisons();
|
||||||
testMatchersReporting();
|
// testMatchersReporting();
|
||||||
testSpecs();
|
// testSpecs();
|
||||||
testAsyncSpecs();
|
// testAsyncSpecs();
|
||||||
testAsyncSpecsWithMockSuite();
|
// testAsyncSpecsWithMockSuite();
|
||||||
|
testSuites();
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
$('spinner').hide();
|
$('spinner').hide();
|
||||||
reporter.summary();
|
reporter.summary();
|
||||||
}, 10000);
|
}, 100);
|
||||||
}
|
}
|
||||||
|
|
||||||
//it('should be an async test') {
|
|
||||||
// run(function() {setup}).and.wait(2000).then.expects_that(true).should_equal(true).and.expects_that
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue