Skip to content

Commit

Permalink
clear default and update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Hampton Paulk committed Feb 14, 2018
1 parent 06253b9 commit 0c9794d
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 188 deletions.
7 changes: 4 additions & 3 deletions src/App.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
<template>
<div id="app">
<book-list></book-list>
<img src="./assets/logo.png">
<hello-world></hello-world>
</div>
</template>

<script>
import BookList from './components/BookList';
import HelloWorld from './components/HelloWorld';
export default {
name: 'app',
components: {
BookList,
HelloWorld,
},
};
</script>
Expand Down
29 changes: 0 additions & 29 deletions src/components/BookForm.vue

This file was deleted.

19 changes: 0 additions & 19 deletions src/components/BookItem.vue

This file was deleted.

57 changes: 0 additions & 57 deletions src/components/BookList.vue

This file was deleted.

17 changes: 0 additions & 17 deletions src/components/BookSuggestion.vue

This file was deleted.

55 changes: 0 additions & 55 deletions src/components/BookSuggestions.vue

This file was deleted.

6 changes: 3 additions & 3 deletions test/unit/mocha/part1/book-list-has-all-elements.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ describe('BookList.vue', () => {

// Parse for template
const template = nodes.filter(node => node.nodeName === 'template');
assert(template, 'BookList does not contain a template element');
assert(template.length > 0, 'BookList does not contain a template element');

// Parse for script
const script = nodes.filter(node => node.nodeName === 'script');
assert(script, 'BookList does not contain a script element');
assert(script.length > 0, 'BookList does not contain a script element');

// Parse for style
const style = nodes.filter(node => node.nodeName === 'style');
assert(style, 'BookList does not contain a style element');
assert(style.length > 0, 'BookList does not contain a style element');
});
});
4 changes: 2 additions & 2 deletions test/unit/mocha/part3/book-item-contains-props.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ describe('BookItem.vue', () => {
const ast = esprima.parse(script[0].childNodes[0].value, { sourceType: 'module' });

let results = esquery(ast, 'ExportDefaultDeclaration Property[key.name="name"] Literal[value="BookItem"]');
assert(results.length > 0, './BookItem was not imported');
assert(results.length > 0, 'The `BookItem` name was not defined under export default');

results = esquery(ast, 'ExportDefaultDeclaration Property[key.name="props"] Literal[value="book"]');
assert(results.length > 0, './BookItem was not imported');
assert(results.length > 0, 'Props was not defined with an array value of book');
});
});
6 changes: 3 additions & 3 deletions test/unit/mocha/part3/book-item-exists.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,12 @@ describe('BookItem.vue', () => {
const doc = parse5.parseFragment(file.replace(/\n/g, ''), { locationInfo: true });
const nodes = doc.childNodes;
const script = nodes.filter(node => node.nodeName === 'script');
assert(script, 'No script tag exists in BookItem.vue');
assert(script.length > 0, 'No script tag exists in BookItem.vue');

const template = nodes.filter(node => node.nodeName === 'template');
assert(template, 'No template tag exists in BookItem.vue');
assert(template.length > 0, 'No template tag exists in BookItem.vue');

const style = nodes.filter(node => node.nodeName === 'style');
assert(style, 'No style tag exists in BookItem.vue');
assert(style.length > 0, 'No style tag exists in BookItem.vue');
});
});

0 comments on commit 0c9794d

Please sign in to comment.