Created
March 6, 2018 14:32
-
-
Save constantm/a67ab05aae959ba8b8deba8b65d9a802 to your computer and use it in GitHub Desktop.
VueJS borked tests
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
➜ git:(vueJS-user-list) ✗ yarn test | |
yarn run v1.3.2 | |
$ jest --config spec/vue/jest.conf.json | |
FAIL spec/vue/users-add-remove.spec.js | |
UsersAddRemove | |
✕ loads users from remote JSON endpoint and renders table (1531ms) | |
● UsersAddRemove › loads users from remote JSON endpoint and renders table | |
expect(string).toContain(value) | |
Expected string: | |
"<div class=\"users-list\"><div class=\" autocomplete-wrapper\"><input type=\"text\" placeholder=\"Search for users to add\" autocomplete=\"off\" class=\"form-control input-lg autocomplete-input\"> <div class=\" autocomplete autocomplete-list\" style=\"display: none;\"><ul></ul></div></div> <v-client-table data=\"[object Object]\" columns=\"email,remove\" options=\"[object Object]\" class=\"\"></v-client-table></div>" | |
To contain value: | |
"<td class=\"\">[email protected]</td>" | |
58 | }); | |
59 | | |
> 60 | // it('removes a user from the list', () => { | |
61 | // const wrapper = mount(UsersAddRemove, { propsData: PROPS_DATA }); | |
62 | // moxios.wait(() => { | |
63 | // expect(wrapper.html()).toContain('<td class="">[email protected]</td>'); | |
at users-add-remove.spec.js:60:30 | |
at Timeout.callback [as _onTimeout] (../../node_modules/jsdom/lib/jsdom/browser/Window.js:633:19) | |
console.error node_modules/jsdom/lib/jsdom/virtual-console.js:29 | |
Error: Uncaught [Error: expect(string).toContain(value) | |
Expected string: | |
"<div class=\"users-list\"><div class=\" autocomplete-wrapper\"><input type=\"text\" placeholder=\"Search for users to add\" autocomplete=\"off\" class=\"form-control input-lg autocomplete-input\"> <div class=\" autocomplete autocomplete-list\" style=\"display: none;\"><ul></ul></div></div> <v-client-table data=\"[object Object]\" columns=\"email,remove\" options=\"[object Object]\" class=\"\"></v-client-table></div>" | |
To contain value: | |
"<td class=\"\">[email protected]</td>"] | |
at reportException (/Users/constantmeiring/WebDev/popcorn-cloud/node_modules/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js:66:24) | |
at Timeout.callback [as _onTimeout] (/Users/constantmeiring/WebDev/popcorn-cloud/node_modules/jsdom/lib/jsdom/browser/Window.js:635:7) | |
at ontimeout (timers.js:466:11) | |
at tryOnTimeout (timers.js:304:5) | |
at Timer.listOnTimeout (timers.js:267:5) { Error: expect(string).toContain(value) | |
Expected string: | |
"<div class=\"users-list\"><div class=\" autocomplete-wrapper\"><input type=\"text\" placeholder=\"Search for users to add\" autocomplete=\"off\" class=\"form-control input-lg autocomplete-input\"> <div class=\" autocomplete autocomplete-list\" style=\"display: none;\"><ul></ul></div></div> <v-client-table data=\"[object Object]\" columns=\"email,remove\" options=\"[object Object]\" class=\"\"></v-client-table></div>" | |
To contain value: | |
"<td class=\"\">[email protected]</td>" | |
at /Users/constantmeiring/WebDev/popcorn-cloud/spec/vue/users-add-remove.spec.js:60:30 | |
at Timeout.callback [as _onTimeout] (/Users/constantmeiring/WebDev/popcorn-cloud/node_modules/jsdom/lib/jsdom/browser/Window.js:633:19) | |
at ontimeout (timers.js:466:11) | |
at tryOnTimeout (timers.js:304:5) | |
at Timer.listOnTimeout (timers.js:267:5) matcherResult: { message: [Function], pass: false } } | |
Test Suites: 1 failed, 1 total | |
Tests: 1 failed, 1 total | |
Snapshots: 0 total | |
Time: 3.371s | |
Ran all test suites. | |
error Command failed with exit code 1. | |
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment