trackler 2.2.1.132 → 2.2.1.133

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,292 @@
1
+ import House from './house'
2
+
3
+ describe('House', () => {
4
+ it('verse one - the house that jack built', () => {
5
+ const lyrics = [
6
+ 'This is the house that Jack built.',
7
+ ]
8
+ expect(House.verse(1)).toEqual(lyrics)
9
+ })
10
+
11
+ xit('verse two - the malt that lay', () => {
12
+ const lyrics = [
13
+ 'This is the malt',
14
+ 'that lay in the house that Jack built.',
15
+ ]
16
+ expect(House.verse(2)).toEqual(lyrics)
17
+ })
18
+
19
+ xit('verse three - the rat that ate', () => {
20
+ const lyrics = [
21
+ 'This is the rat',
22
+ 'that ate the malt',
23
+ 'that lay in the house that Jack built.',
24
+ ]
25
+ expect(House.verse(3)).toEqual(lyrics)
26
+ })
27
+
28
+ xit('verse four - the cat that killed', () => {
29
+ const lyrics = [
30
+ 'This is the cat',
31
+ 'that killed the rat',
32
+ 'that ate the malt',
33
+ 'that lay in the house that Jack built.',
34
+ ]
35
+ expect(House.verse(4)).toEqual(lyrics)
36
+ })
37
+
38
+ xit('verse five - the dog that worried', () => {
39
+ const lyrics = [
40
+ 'This is the dog',
41
+ 'that worried the cat',
42
+ 'that killed the rat',
43
+ 'that ate the malt',
44
+ 'that lay in the house that Jack built.',
45
+ ]
46
+ expect(House.verse(5)).toEqual(lyrics)
47
+ })
48
+
49
+ xit('verse six - the cow with the crumpled horn', () => {
50
+ const lyrics = [
51
+ 'This is the cow with the crumpled horn',
52
+ 'that tossed the dog',
53
+ 'that worried the cat',
54
+ 'that killed the rat',
55
+ 'that ate the malt',
56
+ 'that lay in the house that Jack built.',
57
+ ]
58
+ expect(House.verse(6)).toEqual(lyrics)
59
+ })
60
+
61
+ xit('verse seven - the maiden all forlorn', () => {
62
+ const lyrics = [
63
+ 'This is the maiden all forlorn',
64
+ 'that milked the cow with the crumpled horn',
65
+ 'that tossed the dog',
66
+ 'that worried the cat',
67
+ 'that killed the rat',
68
+ 'that ate the malt',
69
+ 'that lay in the house that Jack built.',
70
+ ]
71
+ expect(House.verse(7)).toEqual(lyrics)
72
+ })
73
+
74
+ xit('verse eight - the man all tattered and torn', () => {
75
+ const lyrics = [
76
+ 'This is the man all tattered and torn',
77
+ 'that kissed the maiden all forlorn',
78
+ 'that milked the cow with the crumpled horn',
79
+ 'that tossed the dog',
80
+ 'that worried the cat',
81
+ 'that killed the rat',
82
+ 'that ate the malt',
83
+ 'that lay in the house that Jack built.',
84
+ ]
85
+ expect(House.verse(8)).toEqual(lyrics)
86
+ })
87
+
88
+ xit('verse nine - the priest all shaven and shorn', () => {
89
+ const lyrics = [
90
+ 'This is the priest all shaven and shorn',
91
+ 'that married the man all tattered and torn',
92
+ 'that kissed the maiden all forlorn',
93
+ 'that milked the cow with the crumpled horn',
94
+ 'that tossed the dog',
95
+ 'that worried the cat',
96
+ 'that killed the rat',
97
+ 'that ate the malt',
98
+ 'that lay in the house that Jack built.',
99
+ ]
100
+ expect(House.verse(9)).toEqual(lyrics)
101
+ })
102
+
103
+ xit('verse ten - the rooster that crowed in the morn', () => {
104
+ const lyrics = [
105
+ 'This is the rooster that crowed in the morn',
106
+ 'that woke the priest all shaven and shorn',
107
+ 'that married the man all tattered and torn',
108
+ 'that kissed the maiden all forlorn',
109
+ 'that milked the cow with the crumpled horn',
110
+ 'that tossed the dog',
111
+ 'that worried the cat',
112
+ 'that killed the rat',
113
+ 'that ate the malt',
114
+ 'that lay in the house that Jack built.',
115
+ ]
116
+ expect(House.verse(10)).toEqual(lyrics)
117
+ })
118
+
119
+ xit('verse eleven - the farmer sowing his corn', () => {
120
+ const lyrics = [
121
+ 'This is the farmer sowing his corn',
122
+ 'that kept the rooster that crowed in the morn',
123
+ 'that woke the priest all shaven and shorn',
124
+ 'that married the man all tattered and torn',
125
+ 'that kissed the maiden all forlorn',
126
+ 'that milked the cow with the crumpled horn',
127
+ 'that tossed the dog',
128
+ 'that worried the cat',
129
+ 'that killed the rat',
130
+ 'that ate the malt',
131
+ 'that lay in the house that Jack built.',
132
+ ]
133
+ expect(House.verse(11)).toEqual(lyrics)
134
+ })
135
+
136
+ xit('verse twelve - the horse and the hound and the horn', () => {
137
+ const lyrics = [
138
+ 'This is the horse and the hound and the horn',
139
+ 'that belonged to the farmer sowing his corn',
140
+ 'that kept the rooster that crowed in the morn',
141
+ 'that woke the priest all shaven and shorn',
142
+ 'that married the man all tattered and torn',
143
+ 'that kissed the maiden all forlorn',
144
+ 'that milked the cow with the crumpled horn',
145
+ 'that tossed the dog',
146
+ 'that worried the cat',
147
+ 'that killed the rat',
148
+ 'that ate the malt',
149
+ 'that lay in the house that Jack built.',
150
+ ]
151
+ expect(House.verse(12)).toEqual(lyrics)
152
+ })
153
+
154
+ xit('multiple verses', () => {
155
+ const startVerse = 4
156
+ const endVerse = 8
157
+ const lyrics = [
158
+ 'This is the cat',
159
+ 'that killed the rat',
160
+ 'that ate the malt',
161
+ 'that lay in the house that Jack built.',
162
+ '',
163
+ 'This is the dog',
164
+ 'that worried the cat',
165
+ 'that killed the rat',
166
+ 'that ate the malt',
167
+ 'that lay in the house that Jack built.',
168
+ '',
169
+ 'This is the cow with the crumpled horn',
170
+ 'that tossed the dog',
171
+ 'that worried the cat',
172
+ 'that killed the rat',
173
+ 'that ate the malt',
174
+ 'that lay in the house that Jack built.',
175
+ '',
176
+ 'This is the maiden all forlorn',
177
+ 'that milked the cow with the crumpled horn',
178
+ 'that tossed the dog',
179
+ 'that worried the cat',
180
+ 'that killed the rat',
181
+ 'that ate the malt',
182
+ 'that lay in the house that Jack built.',
183
+ '',
184
+ 'This is the man all tattered and torn',
185
+ 'that kissed the maiden all forlorn',
186
+ 'that milked the cow with the crumpled horn',
187
+ 'that tossed the dog',
188
+ 'that worried the cat',
189
+ 'that killed the rat',
190
+ 'that ate the malt',
191
+ 'that lay in the house that Jack built.',
192
+ ]
193
+ expect(House.verses(startVerse, endVerse)).toEqual(lyrics)
194
+ })
195
+
196
+ xit('full rhyme', () => {
197
+ const startVerse = 1
198
+ const endVerse = 12
199
+ const lyrics = [
200
+ 'This is the house that Jack built.',
201
+ '',
202
+ 'This is the malt',
203
+ 'that lay in the house that Jack built.',
204
+ '',
205
+ 'This is the rat',
206
+ 'that ate the malt',
207
+ 'that lay in the house that Jack built.',
208
+ '',
209
+ 'This is the cat',
210
+ 'that killed the rat',
211
+ 'that ate the malt',
212
+ 'that lay in the house that Jack built.',
213
+ '',
214
+ 'This is the dog',
215
+ 'that worried the cat',
216
+ 'that killed the rat',
217
+ 'that ate the malt',
218
+ 'that lay in the house that Jack built.',
219
+ '',
220
+ 'This is the cow with the crumpled horn',
221
+ 'that tossed the dog',
222
+ 'that worried the cat',
223
+ 'that killed the rat',
224
+ 'that ate the malt',
225
+ 'that lay in the house that Jack built.',
226
+ '',
227
+ 'This is the maiden all forlorn',
228
+ 'that milked the cow with the crumpled horn',
229
+ 'that tossed the dog',
230
+ 'that worried the cat',
231
+ 'that killed the rat',
232
+ 'that ate the malt',
233
+ 'that lay in the house that Jack built.',
234
+ '',
235
+ 'This is the man all tattered and torn',
236
+ 'that kissed the maiden all forlorn',
237
+ 'that milked the cow with the crumpled horn',
238
+ 'that tossed the dog',
239
+ 'that worried the cat',
240
+ 'that killed the rat',
241
+ 'that ate the malt',
242
+ 'that lay in the house that Jack built.',
243
+ '',
244
+ 'This is the priest all shaven and shorn',
245
+ 'that married the man all tattered and torn',
246
+ 'that kissed the maiden all forlorn',
247
+ 'that milked the cow with the crumpled horn',
248
+ 'that tossed the dog',
249
+ 'that worried the cat',
250
+ 'that killed the rat',
251
+ 'that ate the malt',
252
+ 'that lay in the house that Jack built.',
253
+ '',
254
+ 'This is the rooster that crowed in the morn',
255
+ 'that woke the priest all shaven and shorn',
256
+ 'that married the man all tattered and torn',
257
+ 'that kissed the maiden all forlorn',
258
+ 'that milked the cow with the crumpled horn',
259
+ 'that tossed the dog',
260
+ 'that worried the cat',
261
+ 'that killed the rat',
262
+ 'that ate the malt',
263
+ 'that lay in the house that Jack built.',
264
+ '',
265
+ 'This is the farmer sowing his corn',
266
+ 'that kept the rooster that crowed in the morn',
267
+ 'that woke the priest all shaven and shorn',
268
+ 'that married the man all tattered and torn',
269
+ 'that kissed the maiden all forlorn',
270
+ 'that milked the cow with the crumpled horn',
271
+ 'that tossed the dog',
272
+ 'that worried the cat',
273
+ 'that killed the rat',
274
+ 'that ate the malt',
275
+ 'that lay in the house that Jack built.',
276
+ '',
277
+ 'This is the horse and the hound and the horn',
278
+ 'that belonged to the farmer sowing his corn',
279
+ 'that kept the rooster that crowed in the morn',
280
+ 'that woke the priest all shaven and shorn',
281
+ 'that married the man all tattered and torn',
282
+ 'that kissed the maiden all forlorn',
283
+ 'that milked the cow with the crumpled horn',
284
+ 'that tossed the dog',
285
+ 'that worried the cat',
286
+ 'that killed the rat',
287
+ 'that ate the malt',
288
+ 'that lay in the house that Jack built.',
289
+ ]
290
+ expect(House.verses(startVerse, endVerse)).toEqual(lyrics)
291
+ })
292
+ })
File without changes
@@ -0,0 +1,36 @@
1
+ {
2
+ "name": "xtypescript",
3
+ "version": "1.0.0",
4
+ "description": "Exercism exercises in Typescript.",
5
+ "author": "",
6
+ "private": true,
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/exercism/xtypescript"
10
+ },
11
+ "devDependencies": {},
12
+ "scripts": {
13
+ "test": "tsc --noEmit -p . && jest --no-cache",
14
+ "lint": "tsc --noEmit -p . && tslint \"*.ts?(x)\"",
15
+ "lintci": "tslint \"*.ts?(x)\" --force"
16
+ },
17
+ "dependencies": {
18
+ "@types/jest": "^21.1.5",
19
+ "@types/node": "^8.0.47",
20
+ "jest": "^21.2.1",
21
+ "ts-jest": "^21.1.3",
22
+ "tslint": "^5.8.0",
23
+ "typescript": "^2.5.3"
24
+ },
25
+ "jest": {
26
+ "transform": {
27
+ ".(ts|tsx)": "<rootDir>/node_modules/ts-jest/preprocessor.js"
28
+ },
29
+ "testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$",
30
+ "moduleFileExtensions": [
31
+ "ts",
32
+ "tsx",
33
+ "js"
34
+ ]
35
+ }
36
+ }
@@ -0,0 +1,22 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es2017",
4
+ "module": "commonjs",
5
+ "alwaysStrict": true,
6
+ "noUnusedLocals": true,
7
+ "noUnusedParameters": true,
8
+ "noImplicitAny": true,
9
+ "strictNullChecks": true,
10
+ "preserveConstEnums": true,
11
+ "noFallthroughCasesInSwitch":true,
12
+ "noImplicitThis":true,
13
+ "noImplicitReturns":true,
14
+ "sourceMap": true,
15
+ "noEmitOnError": true,
16
+ "outDir": "./build"
17
+ },
18
+ "compileOnSave": true,
19
+ "exclude": [
20
+ "node_modules"
21
+ ]
22
+ }
@@ -0,0 +1,127 @@
1
+ {
2
+ "jsRules": {
3
+ "class-name": true,
4
+ "comment-format": [
5
+ true,
6
+ "check-space"
7
+ ],
8
+ "indent": [
9
+ true,
10
+ "spaces"
11
+ ],
12
+ "no-duplicate-variable": true,
13
+ "no-eval": true,
14
+ "no-trailing-whitespace": true,
15
+ "no-unsafe-finally": true,
16
+ "one-line": [
17
+ true,
18
+ "check-open-brace",
19
+ "check-whitespace"
20
+ ],
21
+ "quotemark": [
22
+ false,
23
+ "double"
24
+ ],
25
+ "semicolon": [
26
+ true,
27
+ "never"
28
+ ],
29
+ "triple-equals": [
30
+ true,
31
+ "allow-null-check"
32
+ ],
33
+ "variable-name": [
34
+ true,
35
+ "ban-keywords"
36
+ ],
37
+ "whitespace": [
38
+ true,
39
+ "check-branch",
40
+ "check-decl",
41
+ "check-operator",
42
+ "check-separator",
43
+ "check-type"
44
+ ]
45
+ },
46
+ "rules": {
47
+ "class-name": true,
48
+ "comment-format": [
49
+ true,
50
+ "check-space"
51
+ ],
52
+ "indent": [
53
+ true,
54
+ "spaces"
55
+ ],
56
+ "no-eval": true,
57
+ "no-internal-module": true,
58
+ "no-trailing-whitespace": true,
59
+ "no-unsafe-finally": true,
60
+ "no-var-keyword": true,
61
+ "one-line": [
62
+ true,
63
+ "check-open-brace",
64
+ "check-whitespace"
65
+ ],
66
+ "semicolon": [
67
+ true,
68
+ "never"
69
+ ],
70
+ "triple-equals": [
71
+ true,
72
+ "allow-null-check"
73
+ ],
74
+ "typedef-whitespace": [
75
+ true,
76
+ {
77
+ "call-signature": "nospace",
78
+ "index-signature": "nospace",
79
+ "parameter": "nospace",
80
+ "property-declaration": "nospace",
81
+ "variable-declaration": "nospace"
82
+ }
83
+ ],
84
+ "variable-name": [
85
+ true,
86
+ "ban-keywords"
87
+ ],
88
+ "whitespace": [
89
+ true,
90
+ "check-branch",
91
+ "check-decl",
92
+ "check-operator",
93
+ "check-separator",
94
+ "check-type"
95
+ ],
96
+ "no-namespace": true,
97
+ "prefer-for-of": true,
98
+ "only-arrow-functions": [true, "allow-declarations"],
99
+ "no-var-requires": true,
100
+ "no-any": true,
101
+ "curly": true,
102
+ "forin": true,
103
+ "no-arg": true,
104
+ "label-position": true,
105
+ "no-conditional-assignment": true,
106
+ "no-console": [true, "log", "error"],
107
+ "no-construct": true,
108
+ "no-duplicate-variable": true,
109
+ "no-empty": true,
110
+ "no-invalid-this": [true, "check-function-in-method"],
111
+ "no-misused-new": true,
112
+ "no-null-keyword": true,
113
+ "no-string-literal": true,
114
+ "radix": true,
115
+ "typeof-compare": true,
116
+ "use-isnan": true,
117
+ "prefer-const": true,
118
+ "array-type": [true, "array-simple"],
119
+ "arrow-parens": true,
120
+ "new-parens": true,
121
+ "no-consecutive-blank-lines": [true,1],
122
+ "no-parameter-properties": true,
123
+ "no-unnecessary-initializer": true,
124
+ "object-literal-shorthand": true,
125
+ "object-literal-key-quotes": [true, "as-needed"]
126
+ }
127
+ }