Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed tests to make them more like the others and added CLI tests for…
… node testing
- Loading branch information
Showing
2 changed files
with
61 additions
and
27 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/usr/bin/env node | ||
|
||
process.chdir(__dirname); | ||
|
||
var YUITest = require('yuitest'), | ||
path = require('path'), | ||
fs = require('fs'), | ||
dir = path.join(__dirname, '../../../../build-npm/'), | ||
YUI = require(dir).YUI, | ||
json; | ||
|
||
|
||
YUI({useSync: true }).use('test', function(Y) { | ||
Y.Test.Runner = YUITest.TestRunner; | ||
Y.Test.Case = YUITest.TestCase; | ||
Y.Test.Suite = YUITest.TestSuite; | ||
Y.Assert = YUITest.Assert; | ||
|
||
Y.applyConfig({ | ||
modules: { | ||
'module-tests': { | ||
fullpath: path.join(__dirname, '../unit/js/tests.js'), | ||
requires: ['timers', 'test'] | ||
} | ||
} | ||
}); | ||
|
||
Y.use('module-tests'); | ||
|
||
Y.Test.Runner.setName('timers cli tests'); | ||
|
||
}); | ||
|
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 |
---|---|---|
@@ -1,29 +1,30 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title> | ||
timers | ||
</title> | ||
<script src="/build/yui/yui.js"> | ||
</script> | ||
<script src="js/tests.js"> | ||
</script> | ||
</head> | ||
<body class="yui3-skin-sam"> | ||
<div id="logger"> | ||
</div> | ||
<script> | ||
YUI({ | ||
coverage: [ | ||
'timers' | ||
], | ||
filter: (window.location.search.match(/[?&]filter=([^&]+)/) || [])[1] || 'raw' | ||
}).use('test-console', 'test', 'module-tests', function (Y) { | ||
(new Y.Test.Console()).render('#logger'); | ||
Y.Test.Runner.setName('timers'); | ||
Y.Test.Runner.run(); | ||
}); | ||
</script> | ||
</body> | ||
</html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<title>Timers</title> | ||
<script src="../../../../build/yui/yui.js"> </script> | ||
</head> | ||
<body class="yui3-skin-sam"> | ||
<div id="logger"> | ||
</div> | ||
<script> | ||
YUI({ | ||
coverage: [ | ||
'timers' | ||
], | ||
modules: { | ||
'module-tests': { | ||
fullpath: './js/tests.js', | ||
requires: ['timers', 'test'] | ||
} | ||
}, | ||
filter: (window.location.search.match(/[?&]filter=([^&]+)/) || [])[1] || 'raw' | ||
}).use('test-console', 'test', 'module-tests', function (Y) { | ||
(new Y.Test.Console()).render('#logger'); | ||
Y.Test.Runner.setName('Timers'); | ||
Y.Test.Runner.run(); | ||
}); | ||
</script> | ||
</body> | ||
</html> |