This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"manifest_version": 2, | |
"name": "extension name", | |
"description": "extension description", | |
"version": "2.0", | |
"content_scripts": [ | |
{ | |
"matches": ["<all_urls>"], |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vuex from "vuex"; | |
import { createLocalVue, shallowMount } from "@vue/test-utils"; | |
import chai, { expect } from "chai"; | |
import sinon from "sinon"; | |
import sinonChai from "sinon-chai"; | |
import Modal from "@/ui/Modal"; | |
import BaseButton from "@/ui/BaseButton"; | |
chai.use(sinonChai); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vuex from "vuex"; | |
import { createLocalVue, shallowMount } from "@vue/test-utils"; | |
import chai, { expect } from "chai"; | |
import sinon from "sinon"; | |
import sinonChai from "sinon-chai"; | |
import Modal from "@/ui/Modal"; | |
import BaseButton from "@/ui/BaseButton"; | |
chai.use(sinonChai); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Spinner from "@/ui/Spinner"; | |
import AppLoadingScreen from "./AppLoadingScreen"; | |
import { shallowMount } from "@vue/test-utils"; | |
import { expect } from "chai"; | |
describe("AppLoadingScreen", () => { | |
let component; | |
beforeEach(() => { | |
component = shallowMount(AppLoadingScreen); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
npm run test:unit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"scripts": { | |
"test:unit": "vue-cli-service test:unit src/**/*.spec.js" | |
}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script> | |
export default { | |
data() { | |
return { | |
activeItem: null, | |
}; | |
}, | |
methods: { | |
selectItem(i) { | |
this.activeItem = i; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<div | |
v-for="(item, i ) in items" | |
:key="i" | |
:class="{ active: i === activeItem}" | |
> | |
// some looped items from data here | |
// button for active toggle | |
<button @click="selectItem(i)"> make item active </button> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Vue from 'vue'; | |
import Vuex from 'vuex'; | |
Vue.use(Vuex); | |
export const store = new Vuex.Store({ | |
state: { | |
categories: ['travel', 'fun', 'social', 'work', 'other'], | |
events: [], | |
}, | |
getters: { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<h1>Create Event {{ userName }}</h1> | |
<p>There are {{catLength}} categories</p> | |
<ul> | |
<li v-for="cat in categories" :key="cat"> | |
{{cat}} | |
</li> | |
</ul> | |
<p> |
NewerOlder