From d805072ad9a7371e289af48b335cec3a1a58bfa6 Mon Sep 17 00:00:00 2001 From: 38elements Date: Mon, 27 Aug 2018 23:39:46 +0900 Subject: [PATCH 1/2] chore: tweaks --- docs/guides/testing-single-file-components-with-jest.md | 2 +- docs/guides/testing-single-file-components-with-karma.md | 2 +- .../testing-single-file-components-with-mocha-webpack.md | 2 +- packages/test-utils/types/test/wrapper.ts | 4 ++++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/docs/guides/testing-single-file-components-with-jest.md b/docs/guides/testing-single-file-components-with-jest.md index 650e5f8ed..7a8248359 100644 --- a/docs/guides/testing-single-file-components-with-jest.md +++ b/docs/guides/testing-single-file-components-with-jest.md @@ -1,4 +1,4 @@ -## Testing Single File Components with Jest +## Testing Single-File Components with Jest > An example project for this setup is available on [GitHub](https://github.com/vuejs/vue-test-utils-jest-example). diff --git a/docs/guides/testing-single-file-components-with-karma.md b/docs/guides/testing-single-file-components-with-karma.md index 273de449e..147168dad 100644 --- a/docs/guides/testing-single-file-components-with-karma.md +++ b/docs/guides/testing-single-file-components-with-karma.md @@ -1,4 +1,4 @@ -## Testing Single File Components with Karma +## Testing Single-File Components with Karma > An example project for this setup is available on [GitHub](https://github.com/eddyerburgh/vue-test-utils-karma-example). diff --git a/docs/guides/testing-single-file-components-with-mocha-webpack.md b/docs/guides/testing-single-file-components-with-mocha-webpack.md index a46149f66..dc94d1bed 100644 --- a/docs/guides/testing-single-file-components-with-mocha-webpack.md +++ b/docs/guides/testing-single-file-components-with-mocha-webpack.md @@ -1,4 +1,4 @@ -## Testing Single File Components with Mocha + webpack +## Testing Single-File Components with Mocha + webpack > An example project for this setup is available on [GitHub](https://github.com/vuejs/vue-test-utils-mocha-webpack-example). diff --git a/packages/test-utils/types/test/wrapper.ts b/packages/test-utils/types/test/wrapper.ts index 816ebeeae..feb9ed70b 100644 --- a/packages/test-utils/types/test/wrapper.ts +++ b/packages/test-utils/types/test/wrapper.ts @@ -7,6 +7,7 @@ import Vue from 'vue' */ let wrapper = mount(normalOptions) + let bool: boolean = wrapper.contains('.foo') bool = wrapper.contains(normalOptions) bool = wrapper.contains(ClassComponent) @@ -19,6 +20,7 @@ bool = wrapper.hasClass('foo-class') bool = wrapper.hasProp('checked', true) bool = wrapper.props().checked bool = wrapper.hasStyle('color', 'red') +bool = wrapper.classes('foo') bool = wrapper.is(normalOptions) bool = wrapper.isEmpty() @@ -66,10 +68,12 @@ wrapper.setChecked() wrapper.setChecked(true) wrapper.setValue('some string') wrapper.setSelected() +wrapper.props('foo') let str: string = wrapper.html() str = wrapper.text() str = wrapper.name() +wrapper.attributes('foo') /** * Tests for WrapperArray API From 30e98e3c7db62a082492f5ce5e549b8a416db8d4 Mon Sep 17 00:00:00 2001 From: 38elements <38elements@users.noreply.github.com> Date: Tue, 28 Aug 2018 00:51:58 +0900 Subject: [PATCH 2/2] Update wrapper.ts --- packages/test-utils/types/test/wrapper.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/test-utils/types/test/wrapper.ts b/packages/test-utils/types/test/wrapper.ts index feb9ed70b..222030e16 100644 --- a/packages/test-utils/types/test/wrapper.ts +++ b/packages/test-utils/types/test/wrapper.ts @@ -7,7 +7,6 @@ import Vue from 'vue' */ let wrapper = mount(normalOptions) - let bool: boolean = wrapper.contains('.foo') bool = wrapper.contains(normalOptions) bool = wrapper.contains(ClassComponent)