Skip to content

Commit 3d1decc

Browse files
committed
testing: derive tag names for test file programmatically
1 parent e791ec3 commit 3d1decc

File tree

2 files changed

+6
-67
lines changed

2 files changed

+6
-67
lines changed

test/rules/assertions/checkTagNames.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
import JSDOC_THREE_TAGS from './jsdoc3Tags';
1+
import {jsdocTags} from '../../../src/tagNames';
22

3-
const ALL_JSDOC_TAGS_COMMENT = '/** \n * @' + JSDOC_THREE_TAGS.join('\n * @') + '\n */';
3+
const ALL_JSDOC_TAGS_COMMENT = '/** \n * @' + Object.keys(
4+
jsdocTags
5+
).reduce((string, tagName, idx) => {
6+
return string + (idx === 0 ? '' : '\n * @') + tagName;
7+
}, '') + '\n */';
48

59
export default {
610
invalid: [

test/rules/assertions/jsdoc3Tags.js

Lines changed: 0 additions & 65 deletions
This file was deleted.

0 commit comments

Comments
 (0)