mirror of
https://github.com/jsdoc/jsdoc.git
synced 2025-12-08 19:46:11 +00:00
add normalize as a synonym for normalise (#884)
This commit is contained in:
parent
3663224f2b
commit
d231bc36d8
@ -108,6 +108,9 @@ Dictionary.prototype.normalise = function normalise(title) {
|
|||||||
return canonicalName;
|
return canonicalName;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/** @function */
|
||||||
|
Dictionary.prototype.normalize = Dictionary.prototype.normalise;
|
||||||
|
|
||||||
// initialize the default dictionary
|
// initialize the default dictionary
|
||||||
dictionary = new Dictionary();
|
dictionary = new Dictionary();
|
||||||
definitions.defineTags(dictionary);
|
definitions.defineTags(dictionary);
|
||||||
|
|||||||
@ -46,6 +46,10 @@ describe('jsdoc/tag/dictionary', function() {
|
|||||||
expect(typeof dictionary.normalise).toBe('function');
|
expect(typeof dictionary.normalise).toBe('function');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should export a normalize method', function() {
|
||||||
|
expect(typeof dictionary.normalize).toBe('function');
|
||||||
|
});
|
||||||
|
|
||||||
it('should export a Dictionary constructor', function() {
|
it('should export a Dictionary constructor', function() {
|
||||||
expect(dictionary.Dictionary).toBeDefined();
|
expect(dictionary.Dictionary).toBeDefined();
|
||||||
expect(typeof dictionary.Dictionary).toBe('function');
|
expect(typeof dictionary.Dictionary).toBe('function');
|
||||||
@ -131,6 +135,12 @@ describe('jsdoc/tag/dictionary', function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
describe('normalize', function() {
|
||||||
|
it('should be identical to "normalise"', function() {
|
||||||
|
expect(testDictionary.normalize).toBe(testDictionary.normalise);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
describe('Dictionary', function() {
|
describe('Dictionary', function() {
|
||||||
it('should be a constructor', function() {
|
it('should be a constructor', function() {
|
||||||
function newDictionary() {
|
function newDictionary() {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user