My folder structure is this:
./package.json
src/Notification.js
test/notification.js
File Notification.js
export default {
template: '<div>{{message}}</div>',
data() {
return {
message: 'Hello world'
};
}
};
File notification.js
import Vue from 'vue';
import test from 'ava';
import Notification from '../src/Notification';
test('that it renders a notification', t => {
new Vue(Notification).$mount();
});
Error when i run: node_modules/.bin/ava
[Vue warn]: You are using the runtime-only build of Vue where the
template compiler is not available. Either pre-compile the templates
into render functions, or use the compiler-incluided build. (found in
<Root>)
1failed
that it renders a notification
test finished without running any assertions
If someone can say me what's wrong and explain the code, i will really appreciate it.