Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

running unit tests .. 5 errors ... #13

Open
ghost opened this issue Sep 17, 2017 · 0 comments
Open

running unit tests .. 5 errors ... #13

ghost opened this issue Sep 17, 2017 · 0 comments

Comments

@ghost
Copy link

ghost commented Sep 17, 2017

node 8, no modification in packge.json

	> [email protected] test /Users/yves/Developments/WIP/VUE.JS/UNIT TESTING/vue-unit
	> NODE_ENV=test karma start test/karma.conf.js --single-run

	16 09 2017 18:15:22.358:WARN [watcher]: All files matched by "/Users/yves/Developments/WIP/VUE.JS/UNIT TESTING/vue-unit/node_modules/chai/chai.js" were excluded or matched by prior matchers.
	16 09 2017 18:15:22.372:WARN [watcher]: All files matched by "/Users/yves/Developments/WIP/VUE.JS/UNIT TESTING/vue-unit/node_modules/chai/chai.js" were excluded or matched by prior matchers.
	16 09 2017 18:15:36.299:INFO [karma]: Karma v1.7.1 server started at http://0.0.0.0:9876/
	16 09 2017 18:15:36.300:INFO [launcher]: Launching browser PhantomJS with unlimited concurrency
	16 09 2017 18:15:36.388:INFO [launcher]: Starting browser PhantomJS
	16 09 2017 18:15:42.679:INFO [PhantomJS 2.1.1 (Mac OS X 0.0.0)]: Connected on socket 5I4iT6Y8INf1tlTZAAAA with id 29606836
	INFO LOG: 'You are running Vue in development mode.
	Make sure to turn on production mode when deploying for production.
	See more tips at https://vuejs.org/guide/deployment.html'

	  build
	    ✓ returns a partially applied mount function
	    ✓ returns a partially applied mount function which takes an options object and callback
	    ✓ provides a default callback to mount
	    ✓ provides a default callback only when the 2nd argument is a function

	  buildShallow
	    ✓ returns a partially applied shallow function

	  fakeActions
	    ✓ returns a sinon stub for a given action
	    ✓ can assert against what arguments an action was dispatched with
	    ✓ can stub what the action returns using sinon
	    ✓ takes an object to stub multiple actions

	  fakeGetters
	    ✓ returns a sinon stub for a given getter
	    ✓ takes an object to stub multiple getters

	  hooks
	    beforeEachHooks
	      ✓ appends a div element to body for mounting components
	      ✓ creates a wrapper div to which components are append when mounted
	    afterEachHooks
	      ✓ removes the div element created by beforeEachHooks only if one exists
	      ✓ destroys mounted Vue instances only when they exists
	      ✓ resets Vue.config.ignoredElements from shallow rendering

	  mount
	    ✓ mounts a basic component
	    ✓ mounts a component with props
	    ✓ mounts a component and listens for events
	    ✓ mounts a component with a slot
	    ✓ mounts a component with a default and named slots
	ERROR LOG: '[Vue warn]: Error in render function: "Error: [VueUnit]: Error when rendering default slot:

	[Vue warn]: Error compiling template:

	Hello World

	- Component template requires a root element, rather than just text.
	"

	(found in <Root>)'
	ERROR LOG: Error{line: 3085, stack: '
	map@[native code]
	createSlots
	render
	_render
	updateComponent
	get
	Watcher
	mountComponent
	$mount
	$mount
	mount

	callFn@http://localhost:9876/absolute/Users/yves/Developments/WIP/VUE.JS/UNIT%20TESTING/vue-unit/node_modules/mocha/mocha.js?8bf1d1adf34e719cca6e8f6915b9cd6eabf83d6b:4481:25
	run@http://localhost:9876/absolute/Users/yves/Developments/WIP/VUE.JS/UNIT%20TESTING/vue-unit/node_modules/mocha/mocha.js?8bf1d1adf34e719cca6e8f6915b9cd6eabf83d6b:4473:13
	runTest@http://localhost:9876/absolute/Users/yves/Developments/WIP/VUE.JS/UNIT%20TESTING/vue-unit/node_modules/mocha/mocha.js?8bf1d1adf34e719cca6e8f6915b9cd6eabf83d6b:4969:13
	http://localhost:9876/absolute/Users/yves/Developments/WIP/VUE.JS/UNIT%20TESTING/vue-unit/node_modules/mocha/mocha.js?8bf1d1adf34e719cca6e8f6915b9cd6eabf83d6b:5075:19
	next@http://localhost:9876/absolute/Users/yves/Developments/WIP/VUE.JS/UNIT%20TESTING/vue-unit/node_modules/mocha/mocha.js?8bf1d1adf34e719cca6e8f6915b9cd6eabf83d6b:4887:16
	http://localhost:9876/absolute/Users/yves/Developments/WIP/VUE.JS/UNIT%20TESTING/vue-unit/node_modules/mocha/mocha.js?8bf1d1adf34e719cca6e8f6915b9cd6eabf83d6b:4897:11
	next@http://localhost:9876/absolute/Users/yves/Developments/WIP/VUE.JS/UNIT%20TESTING/vue-unit/node_modules/mocha/mocha.js?8bf1d1adf34e719cca6e8f6915b9cd6eabf83d6b:4821:16
	http://localhost:9876/absolute/Users/yves/Developments/WIP/VUE.JS/UNIT%20TESTING/vue-unit/node_modules/mocha/mocha.js?8bf1d1adf34e719cca6e8f6915b9cd6eabf83d6b:4860:11
	done@http://localhost:9876/absolute/Users/yves/Developments/WIP/VUE.JS/UNIT%20TESTING/vue-unit/node_modules/mocha/mocha.js?8bf1d1adf34e719cca6e8f6915b9cd6eabf83d6b:4428:7
	callFn@http://localhost:9876/absolute/Users/yves/Developments/WIP/VUE.JS/UNIT%20TESTING/vue-unit/node_modules/mocha/mocha.js?8bf1d1adf34e719cca6e8f6915b9cd6eabf83d6b:4499:11
	run@http://localhost:9876/absolute/Users/yves/Developments/WIP/VUE.JS/UNIT%20TESTING/vue-unit/node_modules/mocha/mocha.js?8bf1d1adf34e719cca6e8f6915b9cd6eabf83d6b:4473:13
	next@http://localhost:9876/absolute/Users/yves/Developments/WIP/VUE.JS/UNIT%20TESTING/vue-unit/node_modules/mocha/mocha.js?8bf1d1adf34e719cca6e8f6915b9cd6eabf83d6b:4835:13
	http://localhost:9876/absolute/Users/yves/Developments/WIP/VUE.JS/UNIT%20TESTING/vue-unit/node_modules/mocha/mocha.js?8bf1d1adf34e719cca6e8f6915b9cd6eabf83d6b:4865:9
	timeslice@http://localhost:9876/absolute/Users/yves/Developments/WIP/VUE.JS/UNIT%20TESTING/vue-unit/node_modules/mocha/mocha.js?8bf1d1adf34e719cca6e8f6915b9cd6eabf83d6b:82:27'}
	    ✗ mounts a component with a default slot only with a text node
	        Attempted to assign to readonly property.
	        mount


	    ✗ throws an Error when named slots are not parsed
	        expected [Function: callMount] to throw error including 'Error when rendering named slot "foo"' but got 'Attempted to assign toreadonly property.'

	    ✗ throws an Error for defaults slots which are not related to text node rendering
	        expected [Function: callMount] to throw error including 'Error when rendering default slot' but got 'Attempted to assign to readonly property.'

	    ✓ mounts a component with provided dependencies
	    ✓ receives an optional callback which is passed the vm after mounting
	    ✓ receives an optional callback without any options
	    ✓ can also take an options object
	    ✓ can take an options object with a callback as well

	  shallow
	    ✓ shallow renders locally registered components

	  waitForUpdate
	    ✓ tests message updates

	  mounting TestComponent
	    ✓ sets and changes props
	    ✓ listens for events
	    ✗ renders slots
	        Attempted to assign to readonly property.
	        mount
	        mount



	    ✗ does all three
	        Attempted to assign to readonly property.
	        mount
	        mount




	  shallow rendering TestComponent
	    ✓ has a shallow rendered child
	    ✓ conditionally renders the child
	    ✓ can still be fully rendered

	PhantomJS 2.1.1 (Mac OS X 0.0.0): Executed 38 of 38 (5 FAILED) (0.504 secs / 0.19 secs)
	TOTAL: 5 FAILED, 33 SUCCESS


	1) mounts a component with a default slot only with a text node
	     mount
	     Attempted to assign to readonly property.
	mount


	2) throws an Error when named slots are not parsed
	     mount
	     expected [Function: callMount] to throw error including 'Error when rendering named slot "foo"' but got 'Attempted to assign to readonly property.'

	3) throws an Error for defaults slots which are not related to text node rendering
	     mount
	     expected [Function: callMount] to throw error including 'Error when rendering default slot' but got 'Attempted to assign to readonly property.'

	4) renders slots
	     mounting TestComponent
	     Attempted to assign to readonly property.
	mount
	mount



	5) does all three
	     mounting TestComponent
	     Attempted to assign to readonly property.
	mount
	mount
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants