jsdoc/test/specs/documentation/quotename.js
Jeff Williams 617b3236bf Replace old, vendored Jasmine with current npm package.
JSDoc-specific test functions are now properties of a `jsdoc` global, not a `jasmine` global.

Also updates license files to reflect the fact that we no longer vendor anything.
2019-05-12 15:10:38 -07:00

22 lines
891 B
JavaScript

describe('quoted names', () => {
describe('when found in square brackets', () => {
const docSet = jsdoc.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 = jsdoc.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"');
});
});
});