jsdoc/test/specs/documentation/quotename.js
Jeff Williams aa0b6c1bfa switch to new-ish ECMAScript syntax
With help from Lebab, plus a lot of manual cleanup. (And more cleanup to come, I'm sure.)
2019-01-15 18:39:10 -08:00

22 lines
895 B
JavaScript

describe('quoted names', () => {
describe('when found in square brackets', () => {
const docSet = jasmine.getDocSetFromFile('test/fixtures/quotename.js');
const found1 = docSet.getByLongname('chat."#channel".open')[0];
it('should have correct name and memberof', () => {
expect(found1.name).toEqual('open');
expect(found1.memberof).toEqual('chat."#channel"');
});
});
describe('when found in an object literal', () => {
const docSet = jasmine.getDocSetFromFile('test/fixtures/quotename2.js');
const found1 = docSet.getByLongname('contacts."say-\\"hello\\"@example.com".username')[0];
it('should have correct name and memberof', () => {
expect(found1.name).toEqual('username');
expect(found1.memberof).toEqual('contacts."say-\\"hello\\"@example.com"');
});
});
});