-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests(jest): moving away from ava - migrate to jest
- Loading branch information
1 parent
6d37d61
commit 0a3621f
Showing
10 changed files
with
3,015 additions
and
4,896 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,5 @@ node_modules | |
npm-debug.log | ||
src/*.js | ||
test/*.js | ||
.rpt2_cache/* | ||
yarn-error.log |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import Vue, { VNode } from 'vue'; | ||
import { Component, Emit, Inject, Model, Prop, Provide, Watch } from '../src/nuxt-property-decorator'; | ||
|
||
@Component | ||
export default class EmitFixture extends Vue { | ||
count = 0; | ||
|
||
@Emit('reset') resetCount() { | ||
this.count = 0; | ||
} | ||
|
||
@Emit() increment(n: number) { | ||
this.count += n; | ||
} | ||
|
||
@Emit() canceled() { | ||
return false; | ||
} | ||
|
||
render (createElement: any): VNode { | ||
return createElement('div'); | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import Vue, { VNode } from 'vue'; | ||
import { Component, Emit, Inject, Model, Prop, Provide, Watch } from '../src/nuxt-property-decorator'; | ||
|
||
const s = Symbol() | ||
@Component({ | ||
provide() { | ||
return { | ||
[s]: 'one', | ||
bar: 'two' | ||
} | ||
} | ||
}) | ||
export class Parent extends Vue { | ||
render (createElement: any): VNode { | ||
return createElement('div'); | ||
} | ||
} | ||
|
||
@Component | ||
export class Child extends Vue { | ||
@Inject(s) foo: string | ||
@Inject() bar: string | ||
render (createElement: any): VNode { | ||
return createElement('div'); | ||
} | ||
} | ||
|
||
@Component | ||
export class GrandChild extends Vue { | ||
@Inject(s) foo: string | ||
@Inject() bar: string | ||
render (createElement: any): VNode { | ||
return createElement('div'); | ||
} | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import Vue, { VNode } from 'vue'; | ||
import { Component, Model } from '../src/nuxt-property-decorator'; | ||
|
||
@Component({ | ||
name: 'test' | ||
}) | ||
export default class ModelFixture extends Vue { | ||
@Model('change') | ||
checked: boolean; | ||
render (createElement: any): VNode { | ||
return createElement('div'); | ||
} | ||
} |
Oops, something went wrong.