├── .editorconfig ├── .gitignore ├── .nojekyll ├── README.md ├── index.html ├── package-lock.json ├── package.json ├── src └── task-manager.js ├── test └── task-manager.spec.js └── vendors ├── prism ├── prism.css └── prism.js └── qunit └── theme └── ninja ├── custom.css └── qunit-theme-ninja.css /.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | charset = utf-8 5 | indent_style = space 6 | indent_size = 4 7 | end_of_line = lf 8 | insert_final_newline = false 9 | trim_trailing_whitespace = true 10 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | npm-debug.log 3 | -------------------------------------------------------------------------------- /.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/piecioshka/training-implement-task-manager/cebb2201802baf2e0f11f31f4d29cd574ac40824/.nojekyll -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # training-implement-task-manager 2 | 3 | ♨️ Exercise through which you learn how to write code by passing unit tests. 4 | 5 | ## What's going on? 6 | 7 | * I've written some __unit tests__ to describe sample production code in `test/` 8 | * Your mission is to **complete the implementation** by writing a code in `src/` 9 | 10 | ## How to complete the training? 11 | 12 | ### 1. **Clone** :busts_in_silhouette: 13 | 14 | ```bash 15 | git clone git@github.com:piecioshka/training-implement-task-manager.git 16 | ``` 17 | 18 | ### 2. **Open** :hammer: 19 | 20 | Open the `index.html` file in the browser and __refresh__ after wrote some code. 21 | 22 | ### 3. **Implement** :construction: 23 | 24 | * Open the `src/task-manager.js` file in the editor 25 | * Write that code which cover each of test cases 26 | * The mission is complete when **all unit tests are passing** :tada: 27 | 28 | :warning: **You must cover all unit tests** :warning: 29 | 30 | ## License 31 | 32 | [The MIT License](http://piecioshka.mit-license.org) @ 2017 33 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Training: Implement TaskManager 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |

Usage

17 | If below code will work, your job is done. 18 |
19 |         
20 |             const queue = new TaskManager();
21 | 
22 |             queue.addTask('first task', function () {
23 |                 this.alert('ble ble');
24 |             }, window);
25 | 
26 |             queue.addTask('second task', function () {
27 |                 this.alert('bla bla');
28 |             }, window);
29 | 
30 |             queue.run(); // it calls all callbacks
31 | 
32 |             queue.getTaskList(); // it return list of tasks
33 | 
34 |             queue.clean(); // it remove all tasks
35 |         
36 |     
37 | 38 |
39 |
40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "training-implement-task-manager", 3 | "version": "1.0.0", 4 | "lockfileVersion": 2, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "training-implement-task-manager", 9 | "version": "1.0.0", 10 | "license": "MIT", 11 | "devDependencies": { 12 | "http-server": "^14.1.1" 13 | } 14 | }, 15 | "node_modules/ansi-styles": { 16 | "version": "4.3.0", 17 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 18 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 19 | "dev": true, 20 | "dependencies": { 21 | "color-convert": "^2.0.1" 22 | }, 23 | "engines": { 24 | "node": ">=8" 25 | }, 26 | "funding": { 27 | "url": "https://github.com/chalk/ansi-styles?sponsor=1" 28 | } 29 | }, 30 | "node_modules/async": { 31 | "version": "2.6.4", 32 | "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", 33 | "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", 34 | "dev": true, 35 | "dependencies": { 36 | "lodash": "^4.17.14" 37 | } 38 | }, 39 | "node_modules/basic-auth": { 40 | "version": "2.0.1", 41 | "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", 42 | "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", 43 | "dev": true, 44 | "dependencies": { 45 | "safe-buffer": "5.1.2" 46 | }, 47 | "engines": { 48 | "node": ">= 0.8" 49 | } 50 | }, 51 | "node_modules/call-bind": { 52 | "version": "1.0.2", 53 | "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", 54 | "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", 55 | "dev": true, 56 | "dependencies": { 57 | "function-bind": "^1.1.1", 58 | "get-intrinsic": "^1.0.2" 59 | }, 60 | "funding": { 61 | "url": "https://github.com/sponsors/ljharb" 62 | } 63 | }, 64 | "node_modules/chalk": { 65 | "version": "4.1.2", 66 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 67 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 68 | "dev": true, 69 | "dependencies": { 70 | "ansi-styles": "^4.1.0", 71 | "supports-color": "^7.1.0" 72 | }, 73 | "engines": { 74 | "node": ">=10" 75 | }, 76 | "funding": { 77 | "url": "https://github.com/chalk/chalk?sponsor=1" 78 | } 79 | }, 80 | "node_modules/color-convert": { 81 | "version": "2.0.1", 82 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 83 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 84 | "dev": true, 85 | "dependencies": { 86 | "color-name": "~1.1.4" 87 | }, 88 | "engines": { 89 | "node": ">=7.0.0" 90 | } 91 | }, 92 | "node_modules/color-name": { 93 | "version": "1.1.4", 94 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 95 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 96 | "dev": true 97 | }, 98 | "node_modules/corser": { 99 | "version": "2.0.1", 100 | "resolved": "https://registry.npmjs.org/corser/-/corser-2.0.1.tgz", 101 | "integrity": "sha1-jtolLsqrWEDc2XXOuQ2TcMgZ/4c=", 102 | "dev": true, 103 | "engines": { 104 | "node": ">= 0.4.0" 105 | } 106 | }, 107 | "node_modules/debug": { 108 | "version": "3.2.7", 109 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", 110 | "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", 111 | "dev": true, 112 | "dependencies": { 113 | "ms": "^2.1.1" 114 | } 115 | }, 116 | "node_modules/eventemitter3": { 117 | "version": "4.0.7", 118 | "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", 119 | "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", 120 | "dev": true 121 | }, 122 | "node_modules/follow-redirects": { 123 | "version": "1.15.1", 124 | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", 125 | "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==", 126 | "dev": true, 127 | "funding": [ 128 | { 129 | "type": "individual", 130 | "url": "https://github.com/sponsors/RubenVerborgh" 131 | } 132 | ], 133 | "engines": { 134 | "node": ">=4.0" 135 | }, 136 | "peerDependenciesMeta": { 137 | "debug": { 138 | "optional": true 139 | } 140 | } 141 | }, 142 | "node_modules/function-bind": { 143 | "version": "1.1.1", 144 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", 145 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", 146 | "dev": true 147 | }, 148 | "node_modules/get-intrinsic": { 149 | "version": "1.1.1", 150 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", 151 | "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", 152 | "dev": true, 153 | "dependencies": { 154 | "function-bind": "^1.1.1", 155 | "has": "^1.0.3", 156 | "has-symbols": "^1.0.1" 157 | }, 158 | "funding": { 159 | "url": "https://github.com/sponsors/ljharb" 160 | } 161 | }, 162 | "node_modules/has": { 163 | "version": "1.0.3", 164 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", 165 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", 166 | "dev": true, 167 | "dependencies": { 168 | "function-bind": "^1.1.1" 169 | }, 170 | "engines": { 171 | "node": ">= 0.4.0" 172 | } 173 | }, 174 | "node_modules/has-flag": { 175 | "version": "4.0.0", 176 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 177 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 178 | "dev": true, 179 | "engines": { 180 | "node": ">=8" 181 | } 182 | }, 183 | "node_modules/has-symbols": { 184 | "version": "1.0.2", 185 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", 186 | "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", 187 | "dev": true, 188 | "engines": { 189 | "node": ">= 0.4" 190 | }, 191 | "funding": { 192 | "url": "https://github.com/sponsors/ljharb" 193 | } 194 | }, 195 | "node_modules/he": { 196 | "version": "1.2.0", 197 | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", 198 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", 199 | "dev": true, 200 | "bin": { 201 | "he": "bin/he" 202 | } 203 | }, 204 | "node_modules/html-encoding-sniffer": { 205 | "version": "3.0.0", 206 | "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", 207 | "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", 208 | "dev": true, 209 | "dependencies": { 210 | "whatwg-encoding": "^2.0.0" 211 | }, 212 | "engines": { 213 | "node": ">=12" 214 | } 215 | }, 216 | "node_modules/http-proxy": { 217 | "version": "1.18.1", 218 | "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", 219 | "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", 220 | "dev": true, 221 | "dependencies": { 222 | "eventemitter3": "^4.0.0", 223 | "follow-redirects": "^1.0.0", 224 | "requires-port": "^1.0.0" 225 | }, 226 | "engines": { 227 | "node": ">=8.0.0" 228 | } 229 | }, 230 | "node_modules/http-server": { 231 | "version": "14.1.1", 232 | "resolved": "https://registry.npmjs.org/http-server/-/http-server-14.1.1.tgz", 233 | "integrity": "sha512-+cbxadF40UXd9T01zUHgA+rlo2Bg1Srer4+B4NwIHdaGxAGGv59nYRnGGDJ9LBk7alpS0US+J+bLLdQOOkJq4A==", 234 | "dev": true, 235 | "dependencies": { 236 | "basic-auth": "^2.0.1", 237 | "chalk": "^4.1.2", 238 | "corser": "^2.0.1", 239 | "he": "^1.2.0", 240 | "html-encoding-sniffer": "^3.0.0", 241 | "http-proxy": "^1.18.1", 242 | "mime": "^1.6.0", 243 | "minimist": "^1.2.6", 244 | "opener": "^1.5.1", 245 | "portfinder": "^1.0.28", 246 | "secure-compare": "3.0.1", 247 | "union": "~0.5.0", 248 | "url-join": "^4.0.1" 249 | }, 250 | "bin": { 251 | "http-server": "bin/http-server" 252 | }, 253 | "engines": { 254 | "node": ">=12" 255 | } 256 | }, 257 | "node_modules/iconv-lite": { 258 | "version": "0.6.3", 259 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", 260 | "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", 261 | "dev": true, 262 | "dependencies": { 263 | "safer-buffer": ">= 2.1.2 < 3.0.0" 264 | }, 265 | "engines": { 266 | "node": ">=0.10.0" 267 | } 268 | }, 269 | "node_modules/lodash": { 270 | "version": "4.17.21", 271 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", 272 | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", 273 | "dev": true 274 | }, 275 | "node_modules/mime": { 276 | "version": "1.6.0", 277 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", 278 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", 279 | "dev": true, 280 | "bin": { 281 | "mime": "cli.js" 282 | }, 283 | "engines": { 284 | "node": ">=4" 285 | } 286 | }, 287 | "node_modules/minimist": { 288 | "version": "1.2.6", 289 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", 290 | "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", 291 | "dev": true 292 | }, 293 | "node_modules/mkdirp": { 294 | "version": "0.5.5", 295 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", 296 | "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", 297 | "dev": true, 298 | "dependencies": { 299 | "minimist": "^1.2.5" 300 | }, 301 | "bin": { 302 | "mkdirp": "bin/cmd.js" 303 | } 304 | }, 305 | "node_modules/ms": { 306 | "version": "2.1.3", 307 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 308 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 309 | "dev": true 310 | }, 311 | "node_modules/object-inspect": { 312 | "version": "1.11.0", 313 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", 314 | "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", 315 | "dev": true, 316 | "funding": { 317 | "url": "https://github.com/sponsors/ljharb" 318 | } 319 | }, 320 | "node_modules/opener": { 321 | "version": "1.5.2", 322 | "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", 323 | "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", 324 | "dev": true, 325 | "bin": { 326 | "opener": "bin/opener-bin.js" 327 | } 328 | }, 329 | "node_modules/portfinder": { 330 | "version": "1.0.28", 331 | "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", 332 | "integrity": "sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==", 333 | "dev": true, 334 | "dependencies": { 335 | "async": "^2.6.2", 336 | "debug": "^3.1.1", 337 | "mkdirp": "^0.5.5" 338 | }, 339 | "engines": { 340 | "node": ">= 0.12.0" 341 | } 342 | }, 343 | "node_modules/qs": { 344 | "version": "6.10.1", 345 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.1.tgz", 346 | "integrity": "sha512-M528Hph6wsSVOBiYUnGf+K/7w0hNshs/duGsNXPUCLH5XAqjEtiPGwNONLV0tBH8NoGb0mvD5JubnUTrujKDTg==", 347 | "dev": true, 348 | "dependencies": { 349 | "side-channel": "^1.0.4" 350 | }, 351 | "engines": { 352 | "node": ">=0.6" 353 | }, 354 | "funding": { 355 | "url": "https://github.com/sponsors/ljharb" 356 | } 357 | }, 358 | "node_modules/requires-port": { 359 | "version": "1.0.0", 360 | "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", 361 | "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", 362 | "dev": true 363 | }, 364 | "node_modules/safe-buffer": { 365 | "version": "5.1.2", 366 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 367 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", 368 | "dev": true 369 | }, 370 | "node_modules/safer-buffer": { 371 | "version": "2.1.2", 372 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 373 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", 374 | "dev": true 375 | }, 376 | "node_modules/secure-compare": { 377 | "version": "3.0.1", 378 | "resolved": "https://registry.npmjs.org/secure-compare/-/secure-compare-3.0.1.tgz", 379 | "integrity": "sha1-8aAymzCLIh+uN7mXTz1XjQypmeM=", 380 | "dev": true 381 | }, 382 | "node_modules/side-channel": { 383 | "version": "1.0.4", 384 | "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", 385 | "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", 386 | "dev": true, 387 | "dependencies": { 388 | "call-bind": "^1.0.0", 389 | "get-intrinsic": "^1.0.2", 390 | "object-inspect": "^1.9.0" 391 | }, 392 | "funding": { 393 | "url": "https://github.com/sponsors/ljharb" 394 | } 395 | }, 396 | "node_modules/supports-color": { 397 | "version": "7.2.0", 398 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 399 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 400 | "dev": true, 401 | "dependencies": { 402 | "has-flag": "^4.0.0" 403 | }, 404 | "engines": { 405 | "node": ">=8" 406 | } 407 | }, 408 | "node_modules/union": { 409 | "version": "0.5.0", 410 | "resolved": "https://registry.npmjs.org/union/-/union-0.5.0.tgz", 411 | "integrity": "sha512-N6uOhuW6zO95P3Mel2I2zMsbsanvvtgn6jVqJv4vbVcz/JN0OkL9suomjQGmWtxJQXOCqUJvquc1sMeNz/IwlA==", 412 | "dev": true, 413 | "dependencies": { 414 | "qs": "^6.4.0" 415 | }, 416 | "engines": { 417 | "node": ">= 0.8.0" 418 | } 419 | }, 420 | "node_modules/url-join": { 421 | "version": "4.0.1", 422 | "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", 423 | "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==", 424 | "dev": true 425 | }, 426 | "node_modules/whatwg-encoding": { 427 | "version": "2.0.0", 428 | "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", 429 | "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", 430 | "dev": true, 431 | "dependencies": { 432 | "iconv-lite": "0.6.3" 433 | }, 434 | "engines": { 435 | "node": ">=12" 436 | } 437 | } 438 | }, 439 | "dependencies": { 440 | "ansi-styles": { 441 | "version": "4.3.0", 442 | "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", 443 | "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", 444 | "dev": true, 445 | "requires": { 446 | "color-convert": "^2.0.1" 447 | } 448 | }, 449 | "async": { 450 | "version": "2.6.4", 451 | "resolved": "https://registry.npmjs.org/async/-/async-2.6.4.tgz", 452 | "integrity": "sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==", 453 | "dev": true, 454 | "requires": { 455 | "lodash": "^4.17.14" 456 | } 457 | }, 458 | "basic-auth": { 459 | "version": "2.0.1", 460 | "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", 461 | "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", 462 | "dev": true, 463 | "requires": { 464 | "safe-buffer": "5.1.2" 465 | } 466 | }, 467 | "call-bind": { 468 | "version": "1.0.2", 469 | "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", 470 | "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", 471 | "dev": true, 472 | "requires": { 473 | "function-bind": "^1.1.1", 474 | "get-intrinsic": "^1.0.2" 475 | } 476 | }, 477 | "chalk": { 478 | "version": "4.1.2", 479 | "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", 480 | "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", 481 | "dev": true, 482 | "requires": { 483 | "ansi-styles": "^4.1.0", 484 | "supports-color": "^7.1.0" 485 | } 486 | }, 487 | "color-convert": { 488 | "version": "2.0.1", 489 | "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", 490 | "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", 491 | "dev": true, 492 | "requires": { 493 | "color-name": "~1.1.4" 494 | } 495 | }, 496 | "color-name": { 497 | "version": "1.1.4", 498 | "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", 499 | "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", 500 | "dev": true 501 | }, 502 | "corser": { 503 | "version": "2.0.1", 504 | "resolved": "https://registry.npmjs.org/corser/-/corser-2.0.1.tgz", 505 | "integrity": "sha1-jtolLsqrWEDc2XXOuQ2TcMgZ/4c=", 506 | "dev": true 507 | }, 508 | "debug": { 509 | "version": "3.2.7", 510 | "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", 511 | "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", 512 | "dev": true, 513 | "requires": { 514 | "ms": "^2.1.1" 515 | } 516 | }, 517 | "eventemitter3": { 518 | "version": "4.0.7", 519 | "resolved": "https://registry.npmjs.org/eventemitter3/-/eventemitter3-4.0.7.tgz", 520 | "integrity": "sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==", 521 | "dev": true 522 | }, 523 | "follow-redirects": { 524 | "version": "1.15.1", 525 | "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.1.tgz", 526 | "integrity": "sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==", 527 | "dev": true 528 | }, 529 | "function-bind": { 530 | "version": "1.1.1", 531 | "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", 532 | "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", 533 | "dev": true 534 | }, 535 | "get-intrinsic": { 536 | "version": "1.1.1", 537 | "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", 538 | "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", 539 | "dev": true, 540 | "requires": { 541 | "function-bind": "^1.1.1", 542 | "has": "^1.0.3", 543 | "has-symbols": "^1.0.1" 544 | } 545 | }, 546 | "has": { 547 | "version": "1.0.3", 548 | "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", 549 | "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", 550 | "dev": true, 551 | "requires": { 552 | "function-bind": "^1.1.1" 553 | } 554 | }, 555 | "has-flag": { 556 | "version": "4.0.0", 557 | "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", 558 | "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", 559 | "dev": true 560 | }, 561 | "has-symbols": { 562 | "version": "1.0.2", 563 | "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", 564 | "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", 565 | "dev": true 566 | }, 567 | "he": { 568 | "version": "1.2.0", 569 | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", 570 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", 571 | "dev": true 572 | }, 573 | "html-encoding-sniffer": { 574 | "version": "3.0.0", 575 | "resolved": "https://registry.npmjs.org/html-encoding-sniffer/-/html-encoding-sniffer-3.0.0.tgz", 576 | "integrity": "sha512-oWv4T4yJ52iKrufjnyZPkrN0CH3QnrUqdB6In1g5Fe1mia8GmF36gnfNySxoZtxD5+NmYw1EElVXiBk93UeskA==", 577 | "dev": true, 578 | "requires": { 579 | "whatwg-encoding": "^2.0.0" 580 | } 581 | }, 582 | "http-proxy": { 583 | "version": "1.18.1", 584 | "resolved": "https://registry.npmjs.org/http-proxy/-/http-proxy-1.18.1.tgz", 585 | "integrity": "sha512-7mz/721AbnJwIVbnaSv1Cz3Am0ZLT/UBwkC92VlxhXv/k/BBQfM2fXElQNC27BVGr0uwUpplYPQM9LnaBMR5NQ==", 586 | "dev": true, 587 | "requires": { 588 | "eventemitter3": "^4.0.0", 589 | "follow-redirects": "^1.0.0", 590 | "requires-port": "^1.0.0" 591 | } 592 | }, 593 | "http-server": { 594 | "version": "14.1.1", 595 | "resolved": "https://registry.npmjs.org/http-server/-/http-server-14.1.1.tgz", 596 | "integrity": "sha512-+cbxadF40UXd9T01zUHgA+rlo2Bg1Srer4+B4NwIHdaGxAGGv59nYRnGGDJ9LBk7alpS0US+J+bLLdQOOkJq4A==", 597 | "dev": true, 598 | "requires": { 599 | "basic-auth": "^2.0.1", 600 | "chalk": "^4.1.2", 601 | "corser": "^2.0.1", 602 | "he": "^1.2.0", 603 | "html-encoding-sniffer": "^3.0.0", 604 | "http-proxy": "^1.18.1", 605 | "mime": "^1.6.0", 606 | "minimist": "^1.2.6", 607 | "opener": "^1.5.1", 608 | "portfinder": "^1.0.28", 609 | "secure-compare": "3.0.1", 610 | "union": "~0.5.0", 611 | "url-join": "^4.0.1" 612 | } 613 | }, 614 | "iconv-lite": { 615 | "version": "0.6.3", 616 | "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", 617 | "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", 618 | "dev": true, 619 | "requires": { 620 | "safer-buffer": ">= 2.1.2 < 3.0.0" 621 | } 622 | }, 623 | "lodash": { 624 | "version": "4.17.21", 625 | "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", 626 | "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", 627 | "dev": true 628 | }, 629 | "mime": { 630 | "version": "1.6.0", 631 | "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", 632 | "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", 633 | "dev": true 634 | }, 635 | "minimist": { 636 | "version": "1.2.6", 637 | "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz", 638 | "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", 639 | "dev": true 640 | }, 641 | "mkdirp": { 642 | "version": "0.5.5", 643 | "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", 644 | "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", 645 | "dev": true, 646 | "requires": { 647 | "minimist": "^1.2.5" 648 | } 649 | }, 650 | "ms": { 651 | "version": "2.1.3", 652 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", 653 | "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", 654 | "dev": true 655 | }, 656 | "object-inspect": { 657 | "version": "1.11.0", 658 | "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.11.0.tgz", 659 | "integrity": "sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg==", 660 | "dev": true 661 | }, 662 | "opener": { 663 | "version": "1.5.2", 664 | "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", 665 | "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==", 666 | "dev": true 667 | }, 668 | "portfinder": { 669 | "version": "1.0.28", 670 | "resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz", 671 | "integrity": "sha512-Se+2isanIcEqf2XMHjyUKskczxbPH7dQnlMjXX6+dybayyHvAf/TCgyMRlzf/B6QDhAEFOGes0pzRo3by4AbMA==", 672 | "dev": true, 673 | "requires": { 674 | "async": "^2.6.2", 675 | "debug": "^3.1.1", 676 | "mkdirp": "^0.5.5" 677 | } 678 | }, 679 | "qs": { 680 | "version": "6.10.1", 681 | "resolved": "https://registry.npmjs.org/qs/-/qs-6.10.1.tgz", 682 | "integrity": "sha512-M528Hph6wsSVOBiYUnGf+K/7w0hNshs/duGsNXPUCLH5XAqjEtiPGwNONLV0tBH8NoGb0mvD5JubnUTrujKDTg==", 683 | "dev": true, 684 | "requires": { 685 | "side-channel": "^1.0.4" 686 | } 687 | }, 688 | "requires-port": { 689 | "version": "1.0.0", 690 | "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", 691 | "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=", 692 | "dev": true 693 | }, 694 | "safe-buffer": { 695 | "version": "5.1.2", 696 | "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", 697 | "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", 698 | "dev": true 699 | }, 700 | "safer-buffer": { 701 | "version": "2.1.2", 702 | "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", 703 | "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", 704 | "dev": true 705 | }, 706 | "secure-compare": { 707 | "version": "3.0.1", 708 | "resolved": "https://registry.npmjs.org/secure-compare/-/secure-compare-3.0.1.tgz", 709 | "integrity": "sha1-8aAymzCLIh+uN7mXTz1XjQypmeM=", 710 | "dev": true 711 | }, 712 | "side-channel": { 713 | "version": "1.0.4", 714 | "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", 715 | "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", 716 | "dev": true, 717 | "requires": { 718 | "call-bind": "^1.0.0", 719 | "get-intrinsic": "^1.0.2", 720 | "object-inspect": "^1.9.0" 721 | } 722 | }, 723 | "supports-color": { 724 | "version": "7.2.0", 725 | "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", 726 | "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", 727 | "dev": true, 728 | "requires": { 729 | "has-flag": "^4.0.0" 730 | } 731 | }, 732 | "union": { 733 | "version": "0.5.0", 734 | "resolved": "https://registry.npmjs.org/union/-/union-0.5.0.tgz", 735 | "integrity": "sha512-N6uOhuW6zO95P3Mel2I2zMsbsanvvtgn6jVqJv4vbVcz/JN0OkL9suomjQGmWtxJQXOCqUJvquc1sMeNz/IwlA==", 736 | "dev": true, 737 | "requires": { 738 | "qs": "^6.4.0" 739 | } 740 | }, 741 | "url-join": { 742 | "version": "4.0.1", 743 | "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", 744 | "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==", 745 | "dev": true 746 | }, 747 | "whatwg-encoding": { 748 | "version": "2.0.0", 749 | "resolved": "https://registry.npmjs.org/whatwg-encoding/-/whatwg-encoding-2.0.0.tgz", 750 | "integrity": "sha512-p41ogyeMUrw3jWclHWTQg1k05DSVXPLcVxRTYsXUk+ZooOCZLcoYgPZ/HL/D/N+uQPOtcp1me1WhBEaX02mhWg==", 751 | "dev": true, 752 | "requires": { 753 | "iconv-lite": "0.6.3" 754 | } 755 | } 756 | } 757 | } 758 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "private": true, 3 | "name": "training-implement-task-manager", 4 | "description": "Task, which learn you how to write code which should pass the unit tests.", 5 | "version": "1.0.0", 6 | "license": "MIT", 7 | "author": { 8 | "name": "Piotr Kowalski", 9 | "email": "piecioshka@gmail.com", 10 | "url": "https://piecioshka.pl/" 11 | }, 12 | "scripts": { 13 | "start": "http-server . -c-1" 14 | }, 15 | "devDependencies": { 16 | "http-server": "^14.1.1" 17 | }, 18 | "repository": { 19 | "type": "git", 20 | "url": "git@github.com:piecioshka/training-implement-task-manager.git" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /src/task-manager.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/piecioshka/training-implement-task-manager/cebb2201802baf2e0f11f31f4d29cd574ac40824/src/task-manager.js -------------------------------------------------------------------------------- /test/task-manager.spec.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | /** 4 | * Put some code to 'src/task-manager.js'. 5 | * Make all unit tests passing. 6 | * 7 | * @author Piotr Kowalski https://piecioshka.pl/ 8 | * @license MIT 9 | * @see https://github.com/piecioshka/training-implement-task-manager 10 | */ 11 | 12 | // ----------------------------------------------------------------------------- 13 | // 14 | // DO NOT MODIFY THIS FILE. 15 | // 16 | // ----------------------------------------------------------------------------- 17 | 18 | function toString(data) { 19 | return Object.prototype.toString.call(data); 20 | } 21 | 22 | function isObject(data) { 23 | return typeof data === 'object' 24 | && data != null 25 | && Array.isArray(data) === false; 26 | } 27 | 28 | QUnit.config.reorder = false; 29 | 30 | QUnit.module('TaskManager', () => { 31 | QUnit.module('General', () => { 32 | QUnit.test('should be defined in global scope', (assert) => { 33 | assert.notEqual(typeof TaskManager, 'undefined', 'TaskManager in not defined. Task: please define a TaskManager in global context'); 34 | }); 35 | 36 | QUnit.test('should be a class', (assert) => { 37 | assert.strictEqual(typeof TaskManager, 'function', 'TaskManager is not a function'); 38 | 39 | try { 40 | new TaskManager(); 41 | assert.ok(true, 'TaskManager is not a constructor'); 42 | } catch (e) { 43 | assert.ok(false, 'TaskManager is not a constructor (maybe is an Arrow Function?)'); 44 | } 45 | 46 | const string = TaskManager.toString(); 47 | const pattern = /^class/; 48 | assert.ok(pattern.test(string), 'TaskManager is not a class. Task: please define TaskManager with a "class" keyword'); 49 | }); 50 | }); 51 | 52 | QUnit.module('API', (hooks) => { 53 | let queue = null; 54 | 55 | hooks.beforeEach(() => { 56 | queue = new TaskManager(); 57 | }); 58 | 59 | QUnit.module('getTaskList', () => { 60 | QUnit.test('should be a function', (assert) => { 61 | assert.strictEqual(typeof queue.getTaskList, 'function', 'TaskManager#getTaskList is not a function. Task: please define it as a method'); 62 | }); 63 | 64 | QUnit.test('should return an array', (assert) => { 65 | assert.strictEqual(toString(queue.getTaskList()), '[object Array]', 'TaskManager#getTaskList() returns not an array. Task: please return an array from getTaskList method'); 66 | }); 67 | 68 | QUnit.test('should return empty array', (assert) => { 69 | const tasks = queue.getTaskList(); 70 | assert.strictEqual(tasks.length, 0, 'TaskManager#getTaskList() returns not empty array'); 71 | }); 72 | 73 | QUnit.test('should always returns the same reference to the array', (assert) => { 74 | const ins1 = queue.getTaskList(); 75 | const ins2 = queue.getTaskList(); 76 | assert.equal(ins1, ins2, 'TaskManager#getTaskList() not returns the same array (reference should be the same). Task: please extract array to a shared class property'); 77 | }); 78 | }); 79 | 80 | QUnit.module('addTask', () => { 81 | QUnit.test('should be a function', (assert) => { 82 | assert.strictEqual(typeof queue.addTask, 'function', 'TaskManager#addTask is not a function. Task: please define it as a method'); 83 | }); 84 | 85 | QUnit.test('should expected 3 params: name, callback, context', (assert) => { 86 | assert.strictEqual(queue.addTask.length, 3, 'Arity (means number of params) of TaskManager#addTask is not equals 3. Task: please define list of params: name, callback, context'); 87 | }); 88 | 89 | QUnit.test('should add task to list of tasks', (assert) => { 90 | queue.addTask('foo', () => null, null); 91 | assert.notEqual(queue.getTaskList().length, 0, 'TaskManager#addTask not add a task (an object) to list of tasks (array)'); 92 | }); 93 | }); 94 | 95 | QUnit.module('run', () => { 96 | QUnit.test('should be a function', (assert) => { 97 | assert.strictEqual(typeof queue.run, 'function', 'TaskManager#run is not a function. Task: please define it as a method'); 98 | }); 99 | }); 100 | 101 | QUnit.module('clean', () => { 102 | QUnit.test('should be a function', (assert) => { 103 | assert.strictEqual(typeof queue.clean, 'function', 'TaskManager#clean is not a function. Task: please define it as a method'); 104 | }); 105 | }); 106 | }); 107 | 108 | QUnit.module('Behaviour', (hooks) => { 109 | let queue = null; 110 | let fake = null; 111 | 112 | hooks.beforeEach(() => { 113 | fake = { 114 | bar: function () { 115 | this.step('the function from the first task have been executed'); 116 | }, 117 | baz: function () { 118 | this.step('the function from the second task have been executed'); 119 | }, 120 | qux: function () { 121 | this.step('the function from the third task have been executed'); 122 | } 123 | }; 124 | 125 | queue = new TaskManager(); 126 | }); 127 | 128 | QUnit.test('the "clean" method should clean list of tasks', (assert) => { 129 | queue.addTask('ble'); 130 | queue.clean(); 131 | const list = queue.getTaskList(); 132 | console.log(list.length); 133 | assert.equal(list.length, 0, 'TaskManager#clean not removed all items from the shared task list'); 134 | 135 | const ins1 = queue.getTaskList(); 136 | queue.clean(); 137 | const ins2 = queue.getTaskList(); 138 | assert.strictEqual(ins1, ins2, 'TaskManager#clean cannot create a new array (should be the same reference)'); 139 | }); 140 | 141 | QUnit.test('the "addTask" method should append items to the list of tasks (mutable)', (assert) => { 142 | const tasks = queue.getTaskList(); 143 | const mockName = 'example-name'; 144 | const mockFunction = () => null; 145 | const mockContext = this; 146 | 147 | queue.clean(); 148 | 149 | const size = tasks.length; 150 | 151 | queue.addTask(mockName, mockFunction, mockContext); 152 | 153 | assert.strictEqual(tasks.length, size + 1, 'After adding one task to the empty list, number of items should equal 1'); 154 | 155 | const task = tasks[0]; 156 | 157 | assert.ok(isObject(task), 'Task should be an object'); 158 | assert.strictEqual(typeof task.name, 'string', 'Task should have a string property called "name"'); 159 | assert.strictEqual(task.name, mockName, 'Task name should equals first parameter of the TaskManager#addTask'); 160 | 161 | assert.strictEqual(typeof task.callback, 'function', 'Task should have a function property called "callback"'); 162 | assert.strictEqual(task.callback, mockFunction, 'Task should be property "callback" equals second parameter of the TaskManager#addTask'); 163 | 164 | assert.strictEqual(typeof task.context, 'object', 'Task should have a function property called "context"'); 165 | assert.strictEqual(task.context, mockContext, 'Task should be property "context" equals second parameter of the TaskManager#addTask'); 166 | }); 167 | 168 | QUnit.test('the callback for the first task should be executed when the "run" function is called', (assert) => { 169 | queue.addTask('task 1', fake.bar.bind(assert)); 170 | queue.run(); 171 | 172 | assert.verifySteps( 173 | [ 174 | 'the function from the first task have been executed' 175 | ], 176 | 'TaskManager#run not execute all callback\'s in loop (eg. Array.prototype.forEach).' 177 | ); 178 | }); 179 | 180 | QUnit.test('the list of tasks should not be shared between Task Manager instances', (assert) => { 181 | queue.clean(); 182 | const queue2 = new TaskManager(); 183 | queue.addTask('test', () => null); 184 | assert.equal(queue2.getTaskList().length, 0, 'New instance of TaskManager should have new list of tasks (maybe define list of tasks on constructor and share it via this)'); 185 | }); 186 | 187 | QUnit.test('each task item should have its callback executed via the "run" function', (assert) => { 188 | queue.addTask('task 2', fake.bar.bind(assert)); 189 | queue.addTask('task 3', fake.baz.bind(assert)); 190 | queue.addTask('task 4', fake.qux.bind(assert)); 191 | 192 | queue.run(); 193 | 194 | assert.verifySteps([ 195 | 'the function from the first task have been executed', 196 | 'the function from the second task have been executed', 197 | 'the function from the third task have been executed' 198 | ]); 199 | }); 200 | 201 | QUnit.test('should run callback with the context', (assert) => { 202 | queue.addTask('task 5', function () { 203 | assert.strictEqual(this, fake, 'Callback was executed without changing context (use call / apply magic methods)'); 204 | }, fake); 205 | 206 | queue.run(); 207 | }); 208 | }); 209 | }); 210 | -------------------------------------------------------------------------------- /vendors/prism/prism.css: -------------------------------------------------------------------------------- 1 | /* PrismJS 1.15.0 2 | https://prismjs.com/download.html#themes=prism-okaidia&languages=clike+javascript */ 3 | /** 4 | * okaidia theme for JavaScript, CSS and HTML 5 | * Loosely based on Monokai textmate theme by http://www.monokai.nl/ 6 | * @author ocodia 7 | */ 8 | 9 | code[class*="language-"], 10 | pre[class*="language-"] { 11 | color: #f8f8f2; 12 | background: none; 13 | text-shadow: 0 1px rgba(0, 0, 0, 0.3); 14 | font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace; 15 | text-align: left; 16 | white-space: pre; 17 | word-spacing: normal; 18 | word-break: normal; 19 | word-wrap: normal; 20 | line-height: 1.5; 21 | 22 | -moz-tab-size: 4; 23 | -o-tab-size: 4; 24 | tab-size: 4; 25 | 26 | -webkit-hyphens: none; 27 | -moz-hyphens: none; 28 | -ms-hyphens: none; 29 | hyphens: none; 30 | } 31 | 32 | /* Code blocks */ 33 | pre[class*="language-"] { 34 | padding: 1em; 35 | margin: .5em 0; 36 | overflow: auto; 37 | border-radius: 0.3em; 38 | } 39 | 40 | :not(pre) > code[class*="language-"], 41 | pre[class*="language-"] { 42 | background: #272822; 43 | } 44 | 45 | /* Inline code */ 46 | :not(pre) > code[class*="language-"] { 47 | padding: .1em; 48 | border-radius: .3em; 49 | white-space: normal; 50 | } 51 | 52 | .token.comment, 53 | .token.prolog, 54 | .token.doctype, 55 | .token.cdata { 56 | color: slategray; 57 | } 58 | 59 | .token.punctuation { 60 | color: #f8f8f2; 61 | } 62 | 63 | .namespace { 64 | opacity: .7; 65 | } 66 | 67 | .token.property, 68 | .token.tag, 69 | .token.constant, 70 | .token.symbol, 71 | .token.deleted { 72 | color: #f92672; 73 | } 74 | 75 | .token.boolean, 76 | .token.number { 77 | color: #ae81ff; 78 | } 79 | 80 | .token.selector, 81 | .token.attr-name, 82 | .token.string, 83 | .token.char, 84 | .token.builtin, 85 | .token.inserted { 86 | color: #a6e22e; 87 | } 88 | 89 | .token.operator, 90 | .token.entity, 91 | .token.url, 92 | .language-css .token.string, 93 | .style .token.string, 94 | .token.variable { 95 | color: #f8f8f2; 96 | } 97 | 98 | .token.atrule, 99 | .token.attr-value, 100 | .token.function, 101 | .token.class-name { 102 | color: #e6db74; 103 | } 104 | 105 | .token.keyword { 106 | color: #66d9ef; 107 | } 108 | 109 | .token.regex, 110 | .token.important { 111 | color: #fd971f; 112 | } 113 | 114 | .token.important, 115 | .token.bold { 116 | font-weight: bold; 117 | } 118 | .token.italic { 119 | font-style: italic; 120 | } 121 | 122 | .token.entity { 123 | cursor: help; 124 | } 125 | -------------------------------------------------------------------------------- /vendors/prism/prism.js: -------------------------------------------------------------------------------- 1 | /* PrismJS 1.15.0 2 | https://prismjs.com/download.html#themes=prism-okaidia&languages=clike+javascript&plugins=normalize-whitespace */ 3 | var _self="undefined"!=typeof window?window:"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope?self:{},Prism=function(){var e=/\blang(?:uage)?-([\w-]+)\b/i,t=0,n=_self.Prism={manual:_self.Prism&&_self.Prism.manual,disableWorkerMessageHandler:_self.Prism&&_self.Prism.disableWorkerMessageHandler,util:{encode:function(e){return e instanceof r?new r(e.type,n.util.encode(e.content),e.alias):"Array"===n.util.type(e)?e.map(n.util.encode):e.replace(/&/g,"&").replace(/e.length)return;if(!(w instanceof s)){if(m&&b!=t.length-1){h.lastIndex=k;var _=h.exec(e);if(!_)break;for(var j=_.index+(d?_[1].length:0),P=_.index+_[0].length,A=b,x=k,O=t.length;O>A&&(P>x||!t[A].type&&!t[A-1].greedy);++A)x+=t[A].length,j>=x&&(++b,k=x);if(t[b]instanceof s)continue;I=A-b,w=e.slice(k,x),_.index-=k}else{h.lastIndex=0;var _=h.exec(w),I=1}if(_){d&&(p=_[1]?_[1].length:0);var j=_.index+p,_=_[0].slice(p),P=j+_.length,N=w.slice(0,j),S=w.slice(P),C=[b,I];N&&(++b,k+=N.length,C.push(N));var E=new s(u,f?n.tokenize(_,f):_,y,_,m);if(C.push(E),S&&C.push(S),Array.prototype.splice.apply(t,C),1!=I&&n.matchGrammar(e,t,r,b,k,!0,u),i)break}else if(i)break}}}}},tokenize:function(e,t){var r=[e],a=t.rest;if(a){for(var l in a)t[l]=a[l];delete t.rest}return n.matchGrammar(e,r,t,0,0,!1),r},hooks:{all:{},add:function(e,t){var r=n.hooks.all;r[e]=r[e]||[],r[e].push(t)},run:function(e,t){var r=n.hooks.all[e];if(r&&r.length)for(var a,l=0;a=r[l++];)a(t)}}},r=n.Token=function(e,t,n,r,a){this.type=e,this.content=t,this.alias=n,this.length=0|(r||"").length,this.greedy=!!a};if(r.stringify=function(e,t,a){if("string"==typeof e)return e;if("Array"===n.util.type(e))return e.map(function(n){return r.stringify(n,t,e)}).join("");var l={type:e.type,content:r.stringify(e.content,t,a),tag:"span",classes:["token",e.type],attributes:{},language:t,parent:a};if(e.alias){var i="Array"===n.util.type(e.alias)?e.alias:[e.alias];Array.prototype.push.apply(l.classes,i)}n.hooks.run("wrap",l);var o=Object.keys(l.attributes).map(function(e){return e+'="'+(l.attributes[e]||"").replace(/"/g,""")+'"'}).join(" ");return"<"+l.tag+' class="'+l.classes.join(" ")+'"'+(o?" "+o:"")+">"+l.content+""},!_self.document)return _self.addEventListener?(n.disableWorkerMessageHandler||_self.addEventListener("message",function(e){var t=JSON.parse(e.data),r=t.language,a=t.code,l=t.immediateClose;_self.postMessage(n.highlight(a,n.languages[r],r)),l&&_self.close()},!1),_self.Prism):_self.Prism;var a=document.currentScript||[].slice.call(document.getElementsByTagName("script")).pop();return a&&(n.filename=a.src,n.manual||a.hasAttribute("data-manual")||("loading"!==document.readyState?window.requestAnimationFrame?window.requestAnimationFrame(n.highlightAll):window.setTimeout(n.highlightAll,16):document.addEventListener("DOMContentLoaded",n.highlightAll))),_self.Prism}();"undefined"!=typeof module&&module.exports&&(module.exports=Prism),"undefined"!=typeof global&&(global.Prism=Prism); 4 | Prism.languages.clike={comment:[{pattern:/(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/,lookbehind:!0},{pattern:/(^|[^\\:])\/\/.*/,lookbehind:!0,greedy:!0}],string:{pattern:/(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/,greedy:!0},"class-name":{pattern:/((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i,lookbehind:!0,inside:{punctuation:/[.\\]/}},keyword:/\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/,"boolean":/\b(?:true|false)\b/,"function":/\w+(?=\()/,number:/\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i,operator:/--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/,punctuation:/[{}[\];(),.:]/}; 5 | Prism.languages.javascript=Prism.languages.extend("clike",{"class-name":[Prism.languages.clike["class-name"],{pattern:/(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/,lookbehind:!0}],keyword:[{pattern:/((?:^|})\s*)(?:catch|finally)\b/,lookbehind:!0},/\b(?:as|async|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/],number:/\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/,"function":/[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\(|\.(?:apply|bind|call)\()/,operator:/-[-=]?|\+[+=]?|!=?=?|<>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/}),Prism.languages.javascript["class-name"][0].pattern=/(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/,Prism.languages.insertBefore("javascript","keyword",{regex:{pattern:/((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[[^\]\r\n]+]|\\.|[^\/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.;})\]]))/,lookbehind:!0,greedy:!0},"function-variable":{pattern:/[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*[=:]\s*(?:function\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i,alias:"function"},constant:/\b[A-Z][A-Z\d_]*\b/}),Prism.languages.insertBefore("javascript","string",{"template-string":{pattern:/`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/,greedy:!0,inside:{interpolation:{pattern:/\${[^}]+}/,inside:{"interpolation-punctuation":{pattern:/^\${|}$/,alias:"punctuation"},rest:Prism.languages.javascript}},string:/[\s\S]+/}}}),Prism.languages.markup&&Prism.languages.insertBefore("markup","tag",{script:{pattern:/()[\s\S]*?(?=<\/script>)/i,lookbehind:!0,inside:Prism.languages.javascript,alias:"language-javascript",greedy:!0}}),Prism.languages.js=Prism.languages.javascript; 6 | !function(){function e(e){this.defaults=r({},e)}function n(e){return e.replace(/-(\w)/g,function(e,n){return n.toUpperCase()})}function t(e){for(var n=0,t=0;tn&&(o[s]="\n"+o[s],a=l)}r[i]=o.join("")}return r.join("\n")}},"undefined"!=typeof module&&module.exports&&(module.exports=e),"undefined"!=typeof Prism&&(Prism.plugins.NormalizeWhitespace=new e({"remove-trailing":!0,"remove-indent":!0,"left-trim":!0,"right-trim":!0}),Prism.hooks.add("before-sanity-check",function(e){var n=Prism.plugins.NormalizeWhitespace;if(!e.settings||e.settings["whitespace-normalization"]!==!1){if((!e.element||!e.element.parentNode)&&e.code)return e.code=n.normalize(e.code,e.settings),void 0;var t=e.element.parentNode,r=/\bno-whitespace-normalization\b/;if(e.code&&t&&"pre"===t.nodeName.toLowerCase()&&!r.test(t.className)&&!r.test(e.element.className)){for(var i=t.childNodes,o="",a="",s=!1,l=0;l a { 25 | color: #ccc; 26 | text-decoration: none; 27 | } 28 | #qunit-header > a:hover { 29 | color: #ccc; 30 | text-decoration: underline; 31 | } 32 | 33 | #qunit-testrunner-toolbar { 34 | float: right; 35 | line-height: 2; 36 | } 37 | .qunit-url-config, 38 | #qunit-modulefilter, 39 | .qunit-filter { 40 | margin-bottom: 1em; 41 | } 42 | .qunit-url-config { 43 | display: block; 44 | } 45 | .qunit-url-config label { 46 | margin-left: 2em; 47 | } 48 | #qunit-modulefilter, 49 | .qunit-filter { 50 | display: inline-block; 51 | margin-left: 2em; 52 | } 53 | #qunit-modulefilter { 54 | position: relative; 55 | line-height: 1; 56 | } 57 | #qunit-modulefilter-search { 58 | box-sizing: border-box; 59 | width: 250px; 60 | } 61 | #qunit-modulefilter-actions { 62 | display: block; 63 | overflow: hidden; 64 | } 65 | #qunit-modulefilter-dropdown { 66 | box-sizing: border-box; 67 | width: 250px; 68 | display: block; 69 | position: absolute; 70 | right: 0; 71 | top: 100%; 72 | border: 1px solid #666; 73 | border-top: none; 74 | background: #111; 75 | } 76 | #qunit-modulefilter .clickable { 77 | display: block; 78 | padding: 0.5em 0.5em; 79 | cursor: pointer; 80 | } 81 | #qunit-modulefilter-actions .clickable { 82 | padding: 1em 0.5em; 83 | } 84 | #qunit-modulefilter .clickable.checked { 85 | background: #222; 86 | } 87 | #qunit-modulefilter-actions button { 88 | margin: 0.5em 0.25em; 89 | float: right; 90 | } 91 | #qunit-modulefilter-actions label { 92 | display: block; 93 | } 94 | #qunit-modulefilter-dropdown-list { 95 | margin: 0; 96 | padding: 0; 97 | border-top: 1px solid #666; 98 | overflow-y: hidden; 99 | } 100 | 101 | #qunit-banner { 102 | display: none; 103 | } 104 | #qunit-banner.qunit-fail ~ #qunit-userAgent { 105 | border-top: 1px solid #c33; 106 | } 107 | #qunit-banner.qunit-pass ~ #qunit-userAgent { 108 | border-top: 1px solid #6c6; 109 | } 110 | 111 | #qunit-userAgent { 112 | padding-top: 2em; 113 | clear: both; 114 | font-family: "Menlo", monospace; 115 | font-size: 9px; 116 | font-weight: normal; 117 | color: #666; 118 | } 119 | 120 | #qunit-testresult { 121 | font-family: "Menlo", monospace; 122 | font-size: 12px; 123 | padding-bottom: 1em; 124 | } 125 | #qunit-testresult .module-name { 126 | font-weight: bold; 127 | } 128 | #qunit-testresult br { 129 | content: ""; 130 | } 131 | #qunit-testresult br:after { 132 | content: " "; 133 | } 134 | #qunit-testresult span:before { 135 | display: inline-block; 136 | } 137 | #qunit-testresult span.failed { 138 | color: #c33; 139 | } 140 | #qunit-testresult span.passed { 141 | color: #6c6; 142 | } 143 | #qunit-testresult a { 144 | color: #666; 145 | } 146 | #qunit-testresult a:hover { 147 | color: #ccc; 148 | } 149 | 150 | /* Test row */ 151 | 152 | #qunit-tests { 153 | list-style-position: inside; 154 | padding: 0; 155 | font-family: "Menlo", monospace; 156 | font-size: 12px; 157 | color: #666; 158 | } 159 | 160 | #qunit-tests li strong { 161 | font-weight: normal; 162 | } 163 | 164 | #qunit-tests li > strong:hover { 165 | cursor: pointer; 166 | color: #ccc; 167 | text-decoration: underline; 168 | } 169 | #qunit-tests li a { 170 | padding: 0 6px; 171 | color: #666; 172 | text-decoration: none; 173 | } 174 | 175 | #qunit-tests li a:hover { 176 | color: #ccc; 177 | text-decoration: underline; 178 | } 179 | 180 | #qunit-tests b.counts, 181 | #qunit-tests .counts b { 182 | font-weight: normal; 183 | } 184 | 185 | #qunit-tests li .runtime { 186 | font-size: smaller; 187 | } 188 | 189 | #qunit-tests li.pass .module-name, 190 | #qunit-tests li.pass .test-name { 191 | color: #ccc; 192 | } 193 | 194 | #qunit-tests li.pass .counts, 195 | #qunit-tests li.pass .test-message { 196 | color: #6c6; 197 | } 198 | 199 | #qunit-tests li.fail .module-name, 200 | #qunit-tests li.fail .test-name, 201 | #qunit-tests li.fail .test-message, 202 | #qunit-tests li.fail .counts .failed { 203 | color: #c33; 204 | } 205 | 206 | #qunit-tests li.fail .counts .passed { 207 | color: #6c6; 208 | } 209 | 210 | /* Test assertion output */ 211 | 212 | .qunit-collapsed { 213 | display: none; 214 | } 215 | 216 | .qunit-assert-list { 217 | list-style-position: inside; 218 | padding: 0 0 0 22px; 219 | } 220 | 221 | .qunit-assert-list li:hover { 222 | color: #ccc; 223 | } 224 | 225 | .qunit-assert-list .runtime { 226 | float: right; 227 | } 228 | 229 | .qunit-assert-list table { 230 | border-collapse: collapse; 231 | } 232 | .qunit-assert-list table td pre { 233 | background-color: #222; 234 | -webkit-border-radius: 4px; 235 | border-radius: 4px; 236 | color: #ccc; 237 | font: inherit; 238 | margin: 3px 0 3px 12px; 239 | padding: 12px 24px; 240 | white-space: pre-wrap; 241 | word-wrap: break-word; 242 | } 243 | .qunit-assert-list table th { 244 | font-weight: normal; 245 | } 246 | .qunit-assert-list table th, 247 | .qunit-assert-list table td { 248 | padding: 0; 249 | vertical-align: top; 250 | } 251 | .qunit-assert-list table tr.test-actual { 252 | color: #c33; 253 | } 254 | .qunit-assert-list table tr.test-diff del { 255 | color: #6c6; 256 | } 257 | .qunit-assert-list table tr.test-diff del, 258 | .qunit-assert-list table tr.test-diff ins { 259 | text-decoration: none; 260 | } 261 | .qunit-assert-list table tr.test-diff ins { 262 | color: #c33; 263 | } 264 | .qunit-assert-list table tr.test-expected { 265 | color: #6c6; 266 | } 267 | 268 | /* Fixture */ 269 | 270 | #qunit-fixture { 271 | position: absolute; 272 | height: 768px; 273 | left: -1024px; 274 | top: -768px; 275 | width: 1024px; 276 | } 277 | --------------------------------------------------------------------------------