How to enable debug in Semantic-UI-React? - semantic-ui-react

I'm using Semantic-UI in my react project.
It works well. but sometimes it shows error in during unit testing with Jest.
This is the error message
console.error node_modules/semantic-ui-react/dist/commonjs/lib/debug.js:25
Semantic-UI-React could not enable debug.
console.error node_modules/semantic-ui-react/dist/commonjs/lib/debug.js:26
TypeError: Cannot read property 'debug' of undefined
at Object.<anonymous> (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/semantic-ui-react/dist/commonjs/lib/debug.js:22:33)
at Runtime._execModule (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:513:13)
at Runtime.requireModule (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:329:14)
at Runtime.requireModuleOrMock (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:405:19)
at Object.<anonymous> (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/semantic-ui-react/dist/commonjs/lib/index.js:77:14)
at Runtime._execModule (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:513:13)
at Runtime.requireModule (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:329:14)
at Runtime.requireModuleOrMock (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:405:19)
at Object.<anonymous> (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/semantic-ui-react/dist/commonjs/addons/Responsive/Responsive.js:43:12)
at Runtime._execModule (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:513:13)
at Runtime.requireModule (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:329:14)
at Runtime.requireModuleOrMock (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:405:19)
at Object.<anonymous> (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/semantic-ui-react/dist/commonjs/addons/Responsive/index.js:8:19)
at Runtime._execModule (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:513:13)
at Runtime.requireModule (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:329:14)
at Runtime.requireModuleOrMock (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:405:19)
at Object.<anonymous> (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/semantic-ui-react/dist/commonjs/index.js:7:19)
at Runtime._execModule (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:513:13)
at Runtime.requireModule (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:329:14)
at Runtime.requireModuleOrMock (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:405:19)
at Object.<anonymous> (/home/ubuntu/work/node/suite/suite-cloud-app/client/src/FamilyViewWithController/index.js:4:24)
at Runtime._execModule (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:513:13)
at Runtime.requireModule (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:329:14)
at Runtime.requireModuleOrMock (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:405:19)
at Object.<anonymous> (/home/ubuntu/work/node/suite/suite-cloud-app/client/src/FamilyViewWithController/index.test.js:1:232)
at Runtime._execModule (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:513:13)
at Runtime.requireModule (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/node_modules/jest-runtime/build/index.js:329:14)
at jasmine2 (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-jasmine2/build/index.js:97:11)
at runTest (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/build/runTest.js:85:10)
at module.exports (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/jest-cli/build/TestWorker.js:87:5)
at handle (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/worker-farm/lib/child/index.js:44:8)
at process.<anonymous> (/home/ubuntu/work/node/suite/suite-cloud-app/client/node_modules/worker-farm/lib/child/index.js:51:3)
at emitTwo (events.js:126:13)
at process.emit (events.js:214:7)
at emit (internal/child_process.js:772:12)
at _combinedTickCallback (internal/process/next_tick.js:141:11)
at process._tickCallback (internal/process/next_tick.js:180:9)
It's very wierd.
- sometimes it appears, sometimes it doesn't
- sometimes it appears in a component, sometimes it doesn't appear in that component.
- it doesn't appear with small amount of components. but it appears with a lot of components.
- but the tests always are passed even if this issue appears.
The test command that I'm using is
CI=true NODE_ENV=test react-scripts test --env=jsdom --no-cache
any thoughts about that? I do want your team to solve this issue or let me know how to fix it.
Regards.

It's a bug, was fixed in https://github.com/Semantic-Org/Semantic-UI-React/pull/3485 and released in 0.86.0.

Related

Setup test for Vue.js-electron app which uses Vuex

I want to setup the following Component and want to run the following basic unit test on it.
(I'm new to Vue.js and not sure which information is valuable for solving my question. Please ask if some other specific code parts would help you to help me.)
user-information.vue:
<template>
<v-layout row wrap justify-center id="wrapper">
<v-flex class="text-xs-center centered">
<v-card>
<v-card-title primary class="title">
User Management
</v-card-title>
</v-card>
</v-flex>
</v-layout>
</template>
<script>
import { mapState } from 'vuex'
export default {
computed: mapState({
users: state => state.userStore.users,
status: state => state.userStore.status
}),
created() {
this.$store.commit('userStore/setDefaultUserStatus');
this.$store.dispatch('userStore/getAllUsers');
},
methods: {
deleteUser
this.$store.commit('userStore/setDefaultUserStatus');
if (confirm('Are you sure?')) {
this.$store.dispatch('userSTore/deleteUser', userId);
}
}
}
}
</script>
LandingPage.spec.js:
import { mount } from '#vue/test-utils';
import UserInformation./../../src/renderer/components/User/user-information.vue';
describe('user-information.vue', () => {
test('is a Vue instance', () => {
const wrapper = mount(UserInformation);
expect(wrapper.isVueInstance()).toBeTruthy();
});
});
When I run npm test, I get the following error:
$ npm test
> management-system#0.1.0 test /home/juri/develop/management-system
> jest
FAIL test/e2e/specs/Launch.spec.js
● Test suite failed to run
Your test suite must contain at least one test.
at node_modules/jest/node_modules/jest-cli/build/TestScheduler.js:256:22
FAIL test/unit/specs/LandingPage.spec.js
● Console
console.error node_modules/vue/dist/vue.runtime.common.js:589
[Vue warn]: Error in config.errorHandler: "TypeError: Cannot read property 'commit' of undefined"
console.error node_modules/vue/dist/vue.runtime.common.js:1739
TypeError: Cannot read property 'commit' of undefined
at VueComponent.created (/home/juri/develop/management-system/src/renderer/components/USer/user-information.vue:85:1)
at callHook (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2919:21)
at VueComponent.Vue._init (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:4628:5)
at new VueComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:4796:12)
at createComponentInstanceForVnode (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:4308:10)
at init (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:4129:45)
at createComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:5606:9)
at createElm (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:5553:9)
at VueComponent.patch [as __patch__] (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:6089:7)
at VueComponent.Vue._update (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2658:19)
at VueComponent.updateComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2786:10)
at Watcher.get (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3140:25)
at new Watcher (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3129:12)
at mountComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2793:3)
at VueComponent.Object.<anonymous>.Vue.$mount (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:7997:10)
at mount (/home/juri/develop/management-system/node_modules/#vue/test-utils/dist/vue-test-utils.js:5645:21)
at Object.test (/home/juri/develop/management-system/test/unit/specs/LandingPage.spec.js:26:21)
at Object.asyncJestTest (/home/juri/develop/management-system/node_modules/jest-jasmine2/build/jasmine_async.js:108:37)
at resolve (/home/juri/develop/management-system/node_modules/jest-jasmine2/build/queue_runner.js:56:12)
at new Promise (<anonymous>)
at mapper (/home/juri/develop/management-system/node_modules/jest-jasmine2/build/queue_runner.js:43:19)
at promise.then (/home/juri/develop/management-system/node_modules/jest-jasmine2/build/queue_runner.js:87:41)
at process.internalTickCallback (internal/process/next_tick.js:77:7)
console.error node_modules/vue/dist/vue.runtime.common.js:589
[Vue warn]: Error in created hook: "TypeError: Cannot read property 'commit' of undefined"
found in
---> <Anonymous>
<Root>
console.error node_modules/vue/dist/vue.runtime.common.js:1739
TypeError: Cannot read property 'commit' of undefined
at VueComponent.created (/home/juri/develop/management-system/src/renderer/components/User/user-information.vue:85:1)
at callHook (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2919:21)
at VueComponent.Vue._init (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:4628:5)
at new VueComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:4796:12)
at createComponentInstanceForVnode (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:4308:10)
at init (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:4129:45)
at createComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:5606:9)
at createElm (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:5553:9)
at VueComponent.patch [as __patch__] (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:6089:7)
at VueComponent.Vue._update (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2658:19)
at VueComponent.updateComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2786:10)
at Watcher.get (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3140:25)
at new Watcher (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3129:12)
at mountComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2793:3)
at VueComponent.Object.<anonymous>.Vue.$mount (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:7997:10)
at mount (/home/juri/develop/management-system/node_modules/#vue/test-utils/dist/vue-test-utils.js:5645:21)
at Object.test (/home/juri/develop/management-system/test/unit/specs/LandingPage.spec.js:26:21)
at Object.asyncJestTest (/home/juri/develop/management-system/node_modules/jest-jasmine2/build/jasmine_async.js:108:37)
at resolve (/home/juri/develop/management-system/node_modules/jest-jasmine2/build/queue_runner.js:56:12)
at new Promise (<anonymous>)
at mapper (/home/juri/develop/management-system/node_modules/jest-jasmine2/build/queue_runner.js:43:19)
at promise.then (/home/juri/develop/management-system/node_modules/jest-jasmine2/build/queue_runner.js:87:41)
at process.internalTickCallback (internal/process/next_tick.js:77:7)
console.error node_modules/vue/dist/vue.runtime.common.js:589
[Vue warn]: Error in config.errorHandler: "TypeError: Cannot read property 'state' of undefined"
console.error node_modules/vue/dist/vue.runtime.common.js:1739
TypeError: Cannot read property 'state' of undefined
at VueComponent.mappedState (/home/juri/develop/management-system/node_modules/vuex/dist/vuex.common.js:793:31)
at Watcher.get (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3140:25)
at Watcher.evaluate (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3247:21)
at Proxy.computedGetter (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3505:17)
at Proxy.render (/home/juri/develop/management-system/src/renderer/components/User/user-information.vue:275:417)
at VueComponent.Vue._render (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:4542:22)
at VueComponent.updateComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2786:21)
at Watcher.get (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3140:25)
at new Watcher (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3129:12)
at mountComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2793:3)
at VueComponent.Object.<anonymous>.Vue.$mount (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:7997:10)
at init (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:4135:13)
at createComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:5606:9)
at createElm (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:5553:9)
at VueComponent.patch [as __patch__] (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:6089:7)
at VueComponent.Vue._update (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2658:19)
at VueComponent.updateComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2786:10)
at Watcher.get (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3140:25)
at new Watcher (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3129:12)
at mountComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2793:3)
at VueComponent.Object.<anonymous>.Vue.$mount (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:7997:10)
at mount (/home/juri/develop/management-system/node_modules/#vue/test-utils/dist/vue-test-utils.js:5645:21)
at Object.test (/home/juri/develop/management-system/test/unit/specs/LandingPage.spec.js:26:21)
at Object.asyncJestTest (/home/juri/develop/management-system/node_modules/jest-jasmine2/build/jasmine_async.js:108:37)
at resolve (/home/juri/develop/management-system/node_modules/jest-jasmine2/build/queue_runner.js:56:12)
at new Promise (<anonymous>)
at mapper (/home/juri/develop/management-system/node_modules/jest-jasmine2/build/queue_runner.js:43:19)
at promise.then (/home/juri/develop/management-system/node_modules/jest-jasmine2/build/queue_runner.js:87:41)
at process.internalTickCallback (internal/process/next_tick.js:77:7)
console.error node_modules/vue/dist/vue.runtime.common.js:589
[Vue warn]: Error in render: "TypeError: Cannot read property 'state' of undefined"
found in
---> <Anonymous>
<Root>
console.error node_modules/vue/dist/vue.runtime.common.js:1739
TypeError: Cannot read property 'state' of undefined
at VueComponent.mappedState (/home/juri/develop/management-system/node_modules/vuex/dist/vuex.common.js:793:31)
at Watcher.get (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3140:25)
at Watcher.evaluate (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3247:21)
at Proxy.computedGetter (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3505:17)
at Proxy.render (/home/juri/develop/management-system/src/renderer/components/User/user-information.vue:275:417)
at VueComponent.Vue._render (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:4542:22)
at VueComponent.updateComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2786:21)
at Watcher.get (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3140:25)
at new Watcher (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3129:12)
at mountComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2793:3)
at VueComponent.Object.<anonymous>.Vue.$mount (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:7997:10)
at init (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:4135:13)
at createComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:5606:9)
at createElm (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:5553:9)
at VueComponent.patch [as __patch__] (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:6089:7)
at VueComponent.Vue._update (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2658:19)
at VueComponent.updateComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2786:10)
at Watcher.get (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3140:25)
at new Watcher (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:3129:12)
at mountComponent (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:2793:3)
at VueComponent.Object.<anonymous>.Vue.$mount (/home/juri/develop/management-system/node_modules/vue/dist/vue.runtime.common.js:7997:10)
at mount (/home/juri/develop/management-system/node_modules/#vue/test-utils/dist/vue-test-utils.js:5645:21)
at Object.test (/home/juri/develop/management-system/test/unit/specs/LandingPage.spec.js:26:21)
at Object.asyncJestTest (/home/juri/develop/management-system/node_modules/jest-jasmine2/build/jasmine_async.js:108:37)
at resolve (/home/juri/develop/management-system/node_modules/jest-jasmine2/build/queue_runner.js:56:12)
at new Promise (<anonymous>)
at mapper (/home/juri/develop/management-system/node_modules/jest-jasmine2/build/queue_runner.js:43:19)
at promise.then (/home/juri/develop/management-system/node_modules/jest-jasmine2/build/queue_runner.js:87:41)
at process.internalTickCallback (internal/process/next_tick.js:77:7)
● user-information.vue › is a Vue instance
TypeError: Cannot read property 'state' of undefined
at VueComponent.mappedState (node_modules/vuex/dist/vuex.common.js:793:31)
at Watcher.get (node_modules/vue/dist/vue.runtime.common.js:3140:25)
at Watcher.evaluate (node_modules/vue/dist/vue.runtime.common.js:3247:21)
at Proxy.computedGetter (node_modules/vue/dist/vue.runtime.common.js:3505:17)
at Proxy.render (src/renderer/components/User/user-information.vue:275:417)
at VueComponent.Vue._render (node_modules/vue/dist/vue.runtime.common.js:4542:22)
at VueComponent.updateComponent (node_modules/vue/dist/vue.runtime.common.js:2786:21)
at Watcher.get (node_modules/vue/dist/vue.runtime.common.js:3140:25)
at new Watcher (node_modules/vue/dist/vue.runtime.common.js:3129:12)
at mountComponent (node_modules/vue/dist/vue.runtime.common.js:2793:3)
at VueComponent.Object.<anonymous>.Vue.$mount (node_modules/vue/dist/vue.runtime.common.js:7997:10)
at init (node_modules/vue/dist/vue.runtime.common.js:4135:13)
at createComponent (node_modules/vue/dist/vue.runtime.common.js:5606:9)
at createElm (node_modules/vue/dist/vue.runtime.common.js:5553:9)
at VueComponent.patch [as __patch__] (node_modules/vue/dist/vue.runtime.common.js:6089:7)
at VueComponent.Vue._update (node_modules/vue/dist/vue.runtime.common.js:2658:19)
at VueComponent.updateComponent (node_modules/vue/dist/vue.runtime.common.js:2786:10)
at Watcher.get (node_modules/vue/dist/vue.runtime.common.js:3140:25)
at new Watcher (node_modules/vue/dist/vue.runtime.common.js:3129:12)
at mountComponent (node_modules/vue/dist/vue.runtime.common.js:2793:3)
at VueComponent.Object.<anonymous>.Vue.$mount (node_modules/vue/dist/vue.runtime.common.js:7997:10)
at mount (node_modules/#vue/test-utils/dist/vue-test-utils.js:5645:21)
at Object.test (test/unit/specs/LandingPage.spec.js:26:21)
Test Suites: 2 failed, 2 total
Tests: 1 failed, 1 total
Snapshots: 0 total
Time: 2.625s
Ran all test suites.
npm ERR! Test failed. See above for more details.
What can I do to solve this error and what is the source of it? As far as I can think of, it looks like it has something to do with Vuex, because it's complaining because of commit() and dispatch() (Vuex-functions). But I'm confused - I'm using no data which is stored in the store in my simple test.
It looks like you need to instantiate Vuex within the test.
Your component has this created() hook, so just by creating it you are referencing the vuex instance.
created() {
this.$store.commit('userStore/setDefaultUserStatus');
this.$store.dispatch('userStore/getAllUsers');
},
You can use createLocalVue() to get an isolated Vue instance, and add Vuex to it, then pass it via mountOptions to mount().
You can also mock the store so that other tests have control over the data.
import Vuex from 'vuex'
import { mount, createLocalVue } from '#vue/test-utils'
const localVue = createLocalVue()
localVue.use(Vuex)
const storeOptions = {
state: ...
getters: ...
mutations: ...
};
const mockStore = new Vuex.Store(storeOptions)
describe('user-information.vue', () => {
let wrapper;
beforeEach(() => {
const mountOptions = {
localVue,
store: mockStore
}
wrapper = mount(UserInformation, mountOptions)
});
test('is a Vue instance', () => {
expect(wrapper.isVueInstance()).toBeTruthy();
});
});

How to solve this stylelint issue?

"C:\Program Files\nodejs\node.exe" "E:/INSTALL MISHA/stylelint/stylelint-master/bin/stylelint.js" -f json --stdin-filename "..\..\..\..\..\:/Computer science/Web Site/HTML CSS JQuery website codecademy/untitled/style.css"
module.js:549
throw err;
^
Error: Cannot find module 'chalk'
at Function.Module._resolveFilename (module.js:547:15)
at Function.Module._load (module.js:474:25)
at Module.require (module.js:596:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (E:\INSTALL MISHA\stylelint\stylelint-master\lib\cli.js:4:15)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
Process finished with exit code 1
I am getting the following error when I try to a CSS file in WebStorm. How to remove the error?

How to track down an "Uncaught Error: Could not find module `#ember/component`" error?

I've updated the addon ember-attacher in my ember project from v0.11.4 to v0.13.0 and now i'm getting the below error:
Uncaught Error: Could not find module `#ember/component` imported from `#ember-decorators/argument/-debug/validated-component`
at missingModule (loader.js:247)
at findModule (loader.js:258)
at Module.findDeps (loader.js:168)
at findModule (loader.js:262)
at Module.findDeps (loader.js:168)
at findModule (loader.js:262)
at Module.findDeps (loader.js:168)
at findModule (loader.js:262)
at Module.findDeps (loader.js:168)
at findModule (loader.js:262)
I think there is some problem with #ember/component not available/loaded yet, when ember-decorators wants to use it. But i don't know how to track down what's causing the issue.
There are no other problems/execptions besides the module error (only some caught ones from babel-polyfill).
Deleting node_modules for a fresh dependencies installation didn't changed anything. It also happens in both, production and delevopment build.
I also tried to reproduce the same issue in a fresh ember-cli project, but didn't managed to do so (created an empty project, added all the same dependencies and config settings, created a test page showing an ember-attacher tooltip and popover).
So it must be a special case, but i don't know what causes the problem.
How can i get more insight about why the error occurs? Are there any hints available from debbuging, which i didn't recognized?
I can't provide a repository of our project, but may be able to provide individual code parts, if specific information is needed.
ember -v --verbose:
ember-cli: 2.17.0
http_parser: 2.7.0
node: 8.9.1
v8: 6.1.534.47
uv: 1.15.0
zlib: 1.2.11
ares: 1.10.1-DEV
modules: 57
nghttp2: 1.25.0
openssl: 1.0.2m
icu: 59.1
unicode: 9.0
cldr: 31.0.1
tz: 2017b
os: win32 x64
Dependencies:
"broccoli-asset-rev": "^2.6.0",
"ember-ajax": "^3.0.0",
"ember-attacher": "^0.13.0",
"ember-chrome-devtools": "^0.2.0",
"ember-cli": "~2.17.0",
"ember-cli-app-version": "^3.1.3",
"ember-cli-autoprefixer": "^0.8.1",
"ember-cli-babel": "^6.10.0",
"ember-cli-dependency-checker": "^2.1.0",
"ember-cli-eslint": "^4.2.2",
"ember-cli-htmlbars": "^2.0.3",
"ember-cli-htmlbars-inline-precompile": "^1.0.2",
"ember-cli-inject-live-reload": "^1.7.0",
"ember-cli-moment-shim": "^3.5.0",
"ember-cli-qunit": "^4.1.1",
"ember-cli-sass": "^7.1.2",
"ember-cli-shims": "^1.2.0",
"ember-cli-sri": "^2.1.1",
"ember-cli-string-helpers": "1.5.0",
"ember-cli-uglify": "^2.0.0",
"ember-cli-windows-addon": "^1.3.1",
"ember-cli-yuidoc": "^0.8.8",
"ember-composable-helpers": "^2.0.3",
"ember-cp-validations": "^3.5.1",
"ember-crumbly": "^2.0.0-alpha.1",
"ember-data": "~2.17.0",
"ember-debounced-properties": "0.0.5",
"ember-drag-drop": "^0.4.6",
"ember-export-application-global": "^2.0.0",
"ember-intl": "^2.31.1",
"ember-intl-cp-validations": "^3.0.1",
"ember-load-initializers": "^1.0.0",
"ember-md5": "^1.0.1",
"ember-moment": "^7.5.0",
"ember-paper": "~1.0.0-beta.3",
"ember-pikaday": "^2.2.3",
"ember-pouch": "^4.3.0",
"ember-promise-helpers": "^1.0.3",
"ember-resolver": "^4.5.0",
"ember-responsive": "^2.0.5",
"ember-route-action-helper": "^2.0.6",
"ember-shepherd": "^2.8.0",
"ember-simple-auth": "^1.4.0",
"ember-source": "~2.17.0",
"ember-tether": "^1.0.0-beta.0",
"ember-timepicker": "^0.2.0",
"ember-transition-helper": "^0.0.6",
"ember-truth-helpers": "^2.0.0",
"ember-user-activity": "^0.9.0",
"ember-uuid": "^1.0.0",
"ember-wormhole": "^0.5.3",
"eslint": "^4.12.1",
"eslint-plugin-ember": "^5.0.1",
"loader.js": "^4.6.0",
"paper-time-picker": "^0.1.15",
"pouchdb-authentication": "^0.5.5",
"string_score": "^0.1.22",
"yuidoc-ember-theme": "^1.4.0"
Any help or tipps are appreciated. Already thanks for taking the time to read my post.

While upgrading the axis2, i got the foolowing java.lang.RuntimeException: Undefined 'Security policy namespace cannot be null.' resource property

I am getting the following exception while upgrading the axis2 version from 1.5.4 to 1.6.1.Note i am using OSGi 3.8.2,jetty server version 8.1.3
2015-09-04 19:21:42.250:WARN:oejs.ServletHandler:/services/WebServiceReceiver
java.lang.RuntimeException: Undefined 'Security policy namespace cannot be null.' resource property
at org.apache.rampart.RampartException.getMessage(RampartException.java:81)
at org.apache.rampart.RampartException.(RampartException.java:41)
at org.apache.rampart.RampartException.(RampartException.java:57)
at org.apache.rampart.RampartMessageData.setWSSecurityVersions(RampartMessageData.java:373)
at org.apache.rampart.RampartMessageData.(RampartMessageData.java:261)
at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:61)
at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:65)
at org.apache.axis2.engine.Phase.invokeHandler(Phase.java:340)
at org.apache.axis2.engine.Phase.invoke(Phase.java:313)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:262)
at org.apache.axis2.engine.AxisEngine.sendFault(AxisEngine.java:516)
at org.apache.axis2.transport.http.AxisServlet.handleFault(AxisServlet.java:433)
at org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:216)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:755)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:598)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:486)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1065)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:413)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:999)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:117)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:111)
at org.eclipse.jetty.server.Server.handle(Server.java:350)
at org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:454)
at org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:900)
at org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:954)
at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:851)
at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235)
at org.eclipse.jetty.server.AsyncHttpConnection.handle(AsyncHttpConnection.java:77)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint.handle(SelectChannelEndPoint.java:606)
at org.eclipse.jetty.io.nio.SelectChannelEndPoint$1.run(SelectChannelEndPoint.java:46)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:603)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:538)
at java.lang.Thread.run(Thread.java:744)
[2015-09-04 19:21:42,292] 637744 [Thread-95] ERROR errors - ERROR:CONNECTOR:webserviceconnector:Attempted read on closed stream.
[2015-09-04 19:21:42,294] 637746 [Thread-95] ERROR errors - CONNECTOR:webserviceconnector:webservice:Attempted read on closed stream.

DEPRECATION: ComputedProperty.cacheable() when upgrading to ember 1.10

I recently upgraded ember 1.9 to 1.10 and get this:
DEPRECATION: ComputedProperty.cacheable() is deprecated. All computed properties are cacheable by default.
however I don't see any uses of this in my code. I'm in an ember cli 0.12.0 project
bower
{
"name": "proj",
"dependencies": {
"jquery": "^1.11.1",
"ember": "1.10.0",
"ember-data": "1.0.0-beta.12",
"ember-resolver": "~0.1.11",
"loader.js": "ember-cli/loader.js#1.0.1",
"ember-cli-shims": "ember-cli/ember-cli-shims#0.0.3",
"ember-cli-test-loader": "rwjblue/ember-cli-test-loader#0.0.4",
"ember-load-initializers": "ember-cli/ember-load-initializers#0.0.2",
"ember-qunit": "0.1.8",
"ember-qunit-notifications": "0.0.4",
"qunit": "~1.15.0"
}
}
Stacktrace:
DEPRECATION: ComputedProperty.cacheable() is deprecated. All computed properties are cacheable by default.
at Descriptor.ComputedPropertyPrototype.cacheable (http://localhost:4201/assets/vendor.js:21101:13)
at http://localhost:4201/assets/vendor.js:73759:10
at requireModule (http://localhost:4201/assets/vendor.js:64433:29)
at reify (http://localhost:4201/assets/vendor.js:64404:22)
at requireModule (http://localhost:4201/assets/vendor.js:64432:17)
at reify (http://localhost:4201/assets/vendor.js:64404:22)
at requireModule (http://localhost:4201/assets/vendor.js:64432:17)
at http://localhost:4201/assets/vendor.js:77306:14
at http://localhost:4201/assets/vendor.js:77307:4
seems to print the dep when this line runs at the ember data loading..
reified = reify(mod.deps, name, seen[name]); at 64432
Moving to both bower and package
"ember-data": "1.0.0-beta.14.1"
fixes this issue