Created
December 22, 2016 00:33
-
-
Save attilah/bc402005fd352c8cf446d2ecfe133450 to your computer and use it in GitHub Desktop.
ES6 Workshop results
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
C:\0>yarn test | |
yarn test v0.18.1 | |
$ jest --config=exercises/jest.config.json | |
FAIL exercises\01_block-scoping.test.js | |
● can be used in place of `var` | |
ReferenceError: bandName is not defined | |
at Object.<anonymous>.test (exercises\01_block-scoping.test.js:5:10) | |
● can modify the value of a `let` variable | |
ReferenceError: releaseName is not defined | |
at Object.<anonymous>.test (exercises\01_block-scoping.test.js:12:10) | |
● cannot modify the value of a `const` variable | |
expect(received).toEqual(expected) | |
Expected value to equal: | |
"ES6" | |
Received: | |
"ES2015" | |
at Object.<anonymous>.test (exercises\01_block-scoping.test.js:20:23) | |
● is trapped inside of an `if` statement | |
expect(function).toThrow(string) | |
Expected the function to throw an error matching: | |
"b is not defined" | |
But it didn't throw anything. | |
at Object.<anonymous>.test (exercises\01_block-scoping.test.js:28:25) | |
● can't redeclare using the same name | |
expect(function).toThrow(string) | |
Expected the function to throw an error matching: | |
"i is not defined" | |
But it didn't throw anything. | |
at Object.<anonymous>.test (exercises\01_block-scoping.test.js:40:18) | |
● means that we can start using block statements | |
expect(function).toThrow(string) | |
Expected the function to throw an error matching: | |
"d is not defined" | |
But it didn't throw anything. | |
at Object.<anonymous>.test (exercises\01_block-scoping.test.js:50:30) | |
FAIL exercises\05_modules.test.js | |
● can destructure the import, to only retain pieces of the import | |
ReferenceError: mySqrt is not defined | |
at Object.<anonymous>.test (exercises\05_modules.test.js:13:10) | |
● can import from my node_modules | |
ReferenceError: _ is not defined | |
at Object.<anonymous>.test (exercises\05_modules.test.js:21:10) | |
FAIL exercises\08_spread.test.js | |
● should be able to call a function and spread the arguments | |
expect(received).toBe(expected) | |
Expected value to be (using ===): | |
1 | |
Received: | |
0 | |
at Object.<anonymous>.test (exercises\08_spread.test.js:5:17) | |
● should be easier to concatenate arrays | |
ReferenceError: result is not defined | |
at Object.<anonymous>.test (exercises\08_spread.test.js:18:10) | |
● should be able to merge properties from objects | |
ReferenceError: result is not defined | |
at Object.<anonymous>.test (exercises\08_spread.test.js:27:10) | |
FAIL exercises\07_parameters.test.js | |
● can be triggered when the incoming argument is undefined | |
expect(received).toBe(expected) | |
Expected value to be (using ===): | |
undefined | |
Received: | |
"Aaron" | |
Difference: | |
Comparing two different types of values: | |
Expected: undefined | |
Received: string | |
at Object.<anonymous>.test (exercises\07_parameters.test.js:7:25) | |
● aren't included in arguments | |
expect(received).toBe(expected) | |
Expected value to be (using ===): | |
undefined | |
Received: | |
1 | |
Difference: | |
Comparing two different types of values: | |
Expected: undefined | |
Received: number | |
at Object.<anonymous>.test (exercises\07_parameters.test.js:19:25) | |
● can trigger a function call | |
expect(received).toBe(expected) | |
Expected value to be (using ===): | |
undefined | |
Received: | |
0 | |
Difference: | |
Comparing two different types of values: | |
Expected: undefined | |
Received: number | |
at Object.<anonymous>.test (exercises\07_parameters.test.js:36:24) | |
● catch non-specified params | |
expect(received).toBe(expected) | |
Expected value to be (using ===): | |
undefined | |
Received: | |
0 | |
Difference: | |
Comparing two different types of values: | |
Expected: undefined | |
Received: number | |
at Object.<anonymous>.test (exercises\07_parameters.test.js:48:26) | |
● has a different length than `arguments` | |
expect(received).toBe(expected) | |
Expected value to be (using ===): | |
undefined | |
Received: | |
true | |
Difference: | |
Comparing two different types of values: | |
Expected: undefined | |
Received: boolean | |
at Object.<anonymous>.test (exercises\07_parameters.test.js:60:19) | |
● is an actual array, unlike arguments | |
expect(received).toBe(expected) | |
Expected value to be (using ===): | |
undefined | |
Received: | |
false | |
Difference: | |
Comparing two different types of values: | |
Expected: undefined | |
Received: boolean | |
at Object.<anonymous>.test (exercises\07_parameters.test.js:79:45) | |
● it can default all arguments, optionally | |
expect(received).toBeDefined() | |
Expected value to be defined, instead received | |
undefined | |
at myFunction (exercises\07_parameters.test.js:93:26) | |
at Object.<anonymous>.test (exercises\07_parameters.test.js:97:3) | |
FAIL exercises\09_arrow.test.js | |
● can replace traditional functions | |
TypeError: fnMultiply is not a function | |
at Object.<anonymous>.test (exercises\09_arrow.test.js:8:10) | |
● binds `this` to the eval scope, not the runtime scope | |
expect(function).not.toThrow() | |
Expected the function not to throw an error. | |
Instead, it threw: | |
TypeError: Cannot read property 'name' of undefined | |
at exercises\09_arrow.test.js:30:20 | |
at Array.map (native) | |
at Object.greetFriends (exercises\09_arrow.test.js:29:22) | |
at expect (exercises\09_arrow.test.js:36:23) | |
at Object.<anonymous>.test (exercises\09_arrow.test.js:36:55) | |
at Object.<anonymous>.test (exercises\09_arrow.test.js:36:55) | |
FAIL exercises\06_object-literal.test.js | |
● can use shorthand for property names | |
TypeError: Cannot read property 'name' of undefined | |
at Object.<anonymous>.test (exercises\06_object-literal.test.js:16:18) | |
FAIL exercises\03_new-apis.test.js | |
● should be easier to determine whether a string includes another | |
ReferenceError: result is not defined | |
at Object.<anonymous>.test (exercises\03_new-apis.test.js:4:10) | |
● should be easier to repeat a string | |
ReferenceError: result is not defined | |
at Object.<anonymous>.test (exercises\03_new-apis.test.js:10:10) | |
● should be able to take an array-like object and convert it into an array | |
ReferenceError: result is not defined | |
at Object.<anonymous>.test (exercises\03_new-apis.test.js:17:10) | |
● should be easier to fill an array with values | |
ReferenceError: result is not defined | |
at Object.<anonymous>.test (exercises\03_new-apis.test.js:23:10) | |
● should be easy to copy properties from one object to another | |
ReferenceError: result is not defined | |
at Object.<anonymous>.test (exercises\03_new-apis.test.js:55:10) | |
FAIL exercises\13_weakmap.test.js | |
● has a set method | |
ReferenceError: myMap is not defined | |
at Object.<anonymous>.test (exercises\13_weakmap.test.js:6:10) | |
● should enable private members in classes | |
expect(received).toBeUndefined() | |
Expected value to be undefined, instead received | |
"Kent C. Dodds" | |
at Object.<anonymous>.test (exercises\13_weakmap.test.js:27:24) | |
FAIL exercises\14_promises.test.js | |
● should resolve | |
assert or throw here | |
at pickApple.then.catch.error (exercises\14_promises.test.js:15:11) | |
● should reject | |
assert or throw here | |
at pickApple.then.catch.error (exercises\14_promises.test.js:33:11) | |
● errors can be caught | |
assert or throw here | |
at pickApple.then.catch.error (exercises\14_promises.test.js:47:11) | |
FAIL exercises\12_maps.test.js | |
● has a set method | |
ReferenceError: myMap is not defined | |
at Object.<anonymous>.test (exercises\12_maps.test.js:5:10) | |
● can use objects as a key | |
ReferenceError: myMap is not defined | |
at Object.<anonymous>.test (exercises\12_maps.test.js:15:10) | |
● doesn't coerce keys | |
expect(received).toBe(expected) | |
Expected value to be (using ===): | |
undefined | |
Received: | |
"Aaron" | |
Difference: | |
Comparing two different types of values: | |
Expected: undefined | |
Received: string | |
at Object.<anonymous>.test (exercises\12_maps.test.js:25:26) | |
FAIL exercises\15_async-await.test.js | |
● should work with resolved promises | |
convert this to an async/await function and remove this error | |
at exercises\15_async-await.test.js:6:11 | |
● should throw an error with a rejected promise | |
convert this to an async/await function and remove this error | |
at exercises\15_async-await.test.js:13:11 | |
FAIL exercises\04_destructure.test.js | |
● can be used to pull apart objects | |
ReferenceError: city is not defined | |
at Object.<anonymous>.test (exercises\04_destructure.test.js:8:10) | |
● sets missing values to undefined | |
ReferenceError: address is not defined | |
at Object.<anonymous>.test (exercises\04_destructure.test.js:15:10) | |
● can alias destructured variables | |
ReferenceError: c is not defined | |
at Object.<anonymous>.test (exercises\04_destructure.test.js:20:10) | |
● can destructure nested variables | |
ReferenceError: lat is not defined | |
at Object.<anonymous>.test (exercises\04_destructure.test.js:30:10) | |
● can be used to pull apart arrays | |
ReferenceError: one is not defined | |
at Object.<anonymous>.test (exercises\04_destructure.test.js:37:10) | |
● can skip indexes in arrays | |
ReferenceError: one is not defined | |
at Object.<anonymous>.test (exercises\04_destructure.test.js:43:10) | |
● can reach nested arrays | |
ReferenceError: one is not defined | |
at Object.<anonymous>.test (exercises\04_destructure.test.js:50:10) | |
FAIL exercises\19_symbols.test.js | |
● should ensure a variable is unique reference | |
ReferenceError: SKY_COLOR_BLUE is not defined | |
at Object.<anonymous>.test (exercises\19_symbols.test.js:19:10) | |
● should help determine if a singleton has already been declared | |
ReferenceError: myRing is not defined | |
at Object.<anonymous>.test (exercises\19_symbols.test.js:52:10) | |
FAIL exercises\02_template-literals.test.js | |
● should support string interpolation | |
expect(received).toBe(expected) | |
Expected value to be (using ===): | |
"Kent C. Dodds has 6 friends: Brooke Dodds, Matt Zabriskie, Aaron Frost, Dave Geddes, Joe Eames, Ryan Florence" | |
Received: | |
"" | |
at Object.<anonymous>.test (exercises\02_template-literals.test.js:15:26) | |
● should support multi-line strings | |
expect(received).toBe(expected) | |
Expected value to be (using ===): | |
" | |
How cool | |
is this!? | |
" | |
Received: | |
"" | |
at Object.<anonymous>.test (exercises\02_template-literals.test.js:23:21) | |
● should support string escaping | |
expect(received).toBe(expected) | |
Expected value to be (using ===): | |
"Hi | |
there!" | |
Received: | |
"" | |
at Object.<anonymous>.test (exercises\02_template-literals.test.js:28:14) | |
● should call the tagging function | |
expect(received).toBe(expected) | |
Expected value to be (using ===): | |
"Hello super-cool World! Are you feeling really happy today?" | |
Received: | |
"fixme" | |
at Object.<anonymous>.test (exercises\02_template-literals.test.js:37:18) | |
FAIL exercises\17_es2017.test.js | |
● String.prototype.padStart saves us from left-pad-gate | |
expect(received).toBe(expected) | |
Expected value to be (using ===): | |
" Worlds Finest" | |
Received: | |
"Worlds Finest" | |
at Object.<anonymous>.test (exercises\17_es2017.test.js:7:18) | |
● String.prototype.padEnd (and padStart) can be given a string to pad with | |
ReferenceError: result is not defined | |
at Object.<anonymous>.test (exercises\17_es2017.test.js:13:10) | |
● Object.values gets just the values of an object | |
ReferenceError: result is not defined | |
at Object.<anonymous>.test (exercises\17_es2017.test.js:31:10) | |
● Object.entries gives an array of arrays as [key, value] | |
ReferenceError: result is not defined | |
at Object.<anonymous>.test (exercises\17_es2017.test.js:61:10) | |
● Trailing commas in function parameter lists and calls help us with git | |
expect(function).not.toThrow() | |
Expected the function not to throw an error. | |
Instead, it threw: | |
SyntaxError: unknown: Unexpected token, expected ) (19:15) | |
17 | a, | |
18 | b, | |
> 19 | ...rest, | |
| ^ | |
20 | ) { | |
21 | log(a, b, ...rest) | |
22 | } | |
at Parser.Object.<anonymous>.pp.raise (node_modules\babylon\lib\parser\location.js:22:13) | |
at Parser.Object.<anonymous>.pp.unexpected (node_modules\babylon\lib\parser\util.js:97:8) | |
at Parser.Object.<anonymous>.pp.expect (node_modules\babylon\lib\parser\util.js:85:33) | |
at Parser.Object.<anonymous>.pp.parseBindingList (node_modules\babylon\lib\parser\lval.js:186:12) | |
at Parser.Object.<anonymous>.pp.parseFunctionParams (node_modules\babylon\lib\parser\statement.js:643:22) | |
at Parser.Object.<anonymous>.pp.parseFunction (node_modules\babylon\lib\parser\statement.js:633:8) | |
at Parser.Object.<anonymous>.pp.parseFunctionStatement (node_modules\babylon\lib\parser\statement.js:303:15) | |
at Parser.Object.<anonymous>.pp.parseStatement (node_modules\babylon\lib\parser\statement.js:89:19) | |
at Parser.Object.<anonymous>.pp.parseBlockBody (node_modules\babylon\lib\parser\statement.js:516:21) | |
at Parser.Object.<anonymous>.pp.parseTopLevel (node_modules\babylon\lib\parser\statement.js:28:8) | |
at Object.<anonymous>.test (exercises\17_es2017.test.js:112:23) | |
FAIL exercises\11_set.test.js | |
● has an add method and a has method | |
ReferenceError: mySet is not defined | |
at Object.<anonymous>.test (exercises\11_set.test.js:5:10) | |
● doesn`t allow duplicates | |
ReferenceError: mySet is not defined | |
at Object.<anonymous>.test (exercises\11_set.test.js:15:10) | |
FAIL exercises\20_generators.test.js | |
● should yield objects with value and done properties | |
expect(received).toBe(expected) | |
Expected value to be (using ===): | |
undefined | |
Received: | |
1 | |
Difference: | |
Comparing two different types of values: | |
Expected: undefined | |
Received: number | |
at Object.<anonymous>.test (exercises\20_generators.test.js:4:29) | |
● can be iterated over | |
expect(received).toBe(expected) | |
Expected value to be (using ===): | |
undefined | |
Received: | |
20 | |
Difference: | |
Comparing two different types of values: | |
Expected: undefined | |
Received: number | |
at Object.<anonymous>.test (exercises\20_generators.test.js:36:15) | |
FAIL exercises\10_class.test.js | |
● has a constructor for initialization | |
ReferenceError: Animal is not defined | |
at Object.<anonymous>.test (exercises\10_class.test.js:6:22) | |
● constructor can have default param values | |
ReferenceError: Animal is not defined | |
at Object.<anonymous>.test (exercises\10_class.test.js:17:22) | |
● can have instance methods | |
ReferenceError: Animal is not defined | |
at Object.<anonymous>.test (exercises\10_class.test.js:27:22) | |
● can have static methods | |
ReferenceError: Animal is not defined | |
at Object.<anonymous>.test (exercises\10_class.test.js:39:22) | |
● can extend another class | |
ReferenceError: Dog is not defined | |
at Object.<anonymous>.test (exercises\10_class.test.js:50:19) | |
● can use property setters and getters | |
ReferenceError: Animal is not defined | |
at Object.<anonymous>.test (exercises\10_class.test.js:61:22) | |
PASS exercises\16_es2016.test.js | |
PASS exercises\18_public-class-fields.test.js | |
Test Suites: 18 failed, 2 passed, 20 total | |
Tests: 64 failed, 6 passed, 70 total | |
Snapshots: 0 total | |
Time: 1.82s | |
Ran all test suites. | |
error Command failed with exit code 1. | |
C:\0> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment