add normalize as a synonym for normalise (#884)

This commit is contained in:
Jeff Williams 2015-01-21 08:43:59 -08:00
parent 3663224f2b
commit d231bc36d8
2 changed files with 13 additions and 0 deletions

View File

@ -108,6 +108,9 @@ Dictionary.prototype.normalise = function normalise(title) {
return canonicalName;
};
/** @function */
Dictionary.prototype.normalize = Dictionary.prototype.normalise;
// initialize the default dictionary
dictionary = new Dictionary();
definitions.defineTags(dictionary);

View File

@ -46,6 +46,10 @@ describe('jsdoc/tag/dictionary', 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() {
expect(dictionary.Dictionary).toBeDefined();
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() {
it('should be a constructor', function() {
function newDictionary() {