mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
This first part of the testing framework upgrade: - enhances the jsdoc script to allow switching to debug mode from the command line - uses Jasmine to run tests - adds flexibility to run tests from multiple root directories - does automatic test discovery, so test files can just be created, dropped in an appropriate folder, and run without having to explicity add it to the test runner - cleans up the test directory layout - incorporates env.rhino.js which should make it easier to test templates - is incomplete: this is just a savepoint. About 1/3 of the tests have been converted. The rest are still run through the old testrunner
21 lines
907 B
JavaScript
21 lines
907 B
JavaScript
(function() {
|
|
var docSet = testhelpers.getDocSetFromFile('test/cases/variations.js'),
|
|
fadein1 = docSet.getByLongname('anim.fadein(1)')[0],
|
|
fadein2 = docSet.getByLongname('anim.fadein(2)')[0];
|
|
|
|
test('When a symbol has a name with a variation, the doclet has a variation property.', function() {
|
|
assert.equal(fadein1.variation, '1');
|
|
assert.equal(fadein2.variation, '2');
|
|
});
|
|
|
|
test('When a symbol has a name with a variation in the name, the doclet name has no variation in it.', function() {
|
|
assert.equal(fadein1.name, 'fadein');
|
|
assert.equal(fadein2.name, 'fadein');
|
|
});
|
|
|
|
test('When a symbol has a name with a variation in the name, the doclet longname has the variation in it.', function() {
|
|
assert.equal(fadein1.longname, 'anim.fadein(1)');
|
|
assert.equal(fadein2.longname, 'anim.fadein(2)');
|
|
});
|
|
|
|
})(); |