From a982cf757a24598c92c4e1a9210b87be22c8f5c4 Mon Sep 17 00:00:00 2001 From: donal <donalspring@gmail.com> Date: Thu, 22 Mar 2018 16:56:16 +0100 Subject: [PATCH] WIP - trying to get jest to see all files = fail --- src/components/TodoList.vue | 30 ++++++++++++++++++++++++++++++ jest.config.js | 2 +- 2 files changed, 31 insertions(+), 1 deletions(-) diff --git a/jest.config.js b/jest.config.js index c922c71..2c3b657 100644 --- a/jest.config.js +++ b/jest.config.js @@ -15,7 +15,7 @@ snapshotSerializers: ["jest-serializer-vue"], collectCoverage: true, collectCoverageFrom: [ - "src/**/*.{js,vue}", + "src/**/*.{js,vue,json,jsx}", "!src/**/*.test.{js,jsx}", "!<rootDir>/node_modules/" ], diff --git a/src/components/TodoList.vue b/src/components/TodoList.vue new file mode 100644 index 0000000..c0daae7 --- /dev/null +++ b/src/components/TodoList.vue @@ -0,0 +1,30 @@ +<template> + <ul> + <li v-for="item in items" :key="item"> + {{ item.message }} + </li> + </ul> +</template> + +<script> +export default { + name: "TodoList", + props: { + item: [ + { message: "todo list" } + ] + } +}; +</script> + +<!-- Add "scoped" attribute to limit CSS to this component only --> +<style scoped lang="scss"> +ul { + list-style-type: none; + padding: 0; +} +li { + display: inline-block; + margin: 0 10px; +} +</style> -- Gitblit v1.9.3