Skip to content

Commit e5980f5

Browse files
Tests: Update requireDictionaryWords spec wordings
1 parent 4e39a46 commit e5980f5

File tree

1 file changed

+12
-15
lines changed

1 file changed

+12
-15
lines changed

test/specs/rules/require-dictionary-words.js

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ describe('rules/require-dictionary-words', function() {
5858
assert(checker.checkString('object[jkl] = 1;').isEmpty());
5959
});
6060

61-
it('should not report real words', function() {
61+
it('should not report defined words', function() {
6262
assert(checker.checkString('good = 1;').isEmpty());
6363
});
6464

65-
it('should not report multiple real words', function() {
65+
it('should not report multiple defined words', function() {
6666
assert(checker.checkString('goodGood = 1;').isEmpty());
6767
});
6868
});
@@ -77,7 +77,7 @@ describe('rules/require-dictionary-words', function() {
7777
assert(checker.checkString('class Asdf { jkl() {} }').getErrorCount() === 2);
7878
});
7979

80-
it('should not report real words in es6', function() {
80+
it('should not report defined words in es6', function() {
8181
assert(checker.checkString('object = {good, good() {}, [0 + 1]: 2};').isEmpty());
8282
assert(checker.checkString('class Good { good() {} }').isEmpty());
8383
});
@@ -92,7 +92,7 @@ describe('rules/require-dictionary-words', function() {
9292
});
9393
});
9494

95-
it('should not report included words', function() {
95+
it('should not report allowed words', function() {
9696
assert(checker.checkString('asdf = 1;').isEmpty());
9797
assert(checker.checkString('object.jkl = 1;').isEmpty());
9898
assert(checker.checkString('asdfAsdf = 1;').isEmpty());
@@ -109,12 +109,12 @@ describe('rules/require-dictionary-words', function() {
109109
});
110110
});
111111

112-
it('should report names used as substrings', function() {
112+
it('should report names used as parts of names', function() {
113113
assert(checker.checkString('asdfAsdf = 1;').getErrorCount() === 2);
114114
assert(checker.checkString('object.jklJkl = 1;').getErrorCount() === 2);
115115
});
116116

117-
it('should not report included names', function() {
117+
it('should not report allowed names', function() {
118118
assert(checker.checkString('asdf = 1;').isEmpty());
119119
assert(checker.checkString('object.jkl = 1;').isEmpty());
120120
});
@@ -129,12 +129,12 @@ describe('rules/require-dictionary-words', function() {
129129
});
130130
});
131131

132-
it('should report non-words', function() {
132+
it('should report non-words in identifiers', function() {
133133
assert(checker.checkString('asdf = 1;').getErrorCount() === 1);
134134
assert(checker.checkString('asdfAsdf = 1;').getErrorCount() === 2);
135135
});
136136

137-
it('should not report included words', function() {
137+
it('should not report allowed words in properties', function() {
138138
assert(checker.checkString('object.jkl = 1;').isEmpty());
139139
assert(checker.checkString('object.jklJkl = 1;').isEmpty());
140140
});
@@ -149,16 +149,13 @@ describe('rules/require-dictionary-words', function() {
149149
});
150150
});
151151

152-
it('should report names used as substrings', function() {
153-
assert(checker.checkString('object.jklJkl = 1;').getErrorCount() === 2);
154-
});
155-
156-
it('should report non-names', function() {
152+
it('should report non-names and identifiers', function() {
157153
assert(checker.checkString('asdf = 1;').getErrorCount() === 1);
158154
assert(checker.checkString('asdfAsdf = 1;').getErrorCount() === 2);
155+
assert(checker.checkString('object.jklJkl = 1;').getErrorCount() === 2);
159156
});
160157

161-
it('should not report included names', function() {
158+
it('should not report allowed names as properties', function() {
162159
assert(checker.checkString('object.jkl = 1;').isEmpty());
163160
});
164161
});
@@ -202,7 +199,7 @@ describe('rules/require-dictionary-words', function() {
202199
});
203200
});
204201

205-
it('should not report real words', function() {
202+
it('should not report defined words', function() {
206203
assert(checker.checkString('color = 1;').isEmpty());
207204
});
208205
});

0 commit comments

Comments
 (0)