Skip to content

Commit

Permalink
New version
Browse files Browse the repository at this point in the history
  • Loading branch information
David-Desmaisons committed Mar 22, 2019
1 parent 3998116 commit 61e97dc
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 19 deletions.
16 changes: 8 additions & 8 deletions docs/app.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-plotly",
"version": "0.6.0",
"version": "0.7.0",
"private": false,
"scripts": {
"serve": "vue-cli-service serve ./example/main.js --open",
Expand Down
5 changes: 1 addition & 4 deletions src/components/Plotly.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
<template>
<div
:id="id"
v-resize:debounce.100="onResize"
/>
<div :id="id" v-resize:debounce.100="onResize" />
</template>
<script>
import Plotly from "plotly.js";
Expand Down
22 changes: 16 additions & 6 deletions tests/unit/plotly.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ describe("Plotly.vue", () => {
const { error } = console;

beforeEach(() => {
console.error = () => { };
console.error = () => {};
jest.clearAllMocks();
update(wrapper);
});
Expand Down Expand Up @@ -241,7 +241,7 @@ describe("Plotly.vue", () => {
const { error } = console;

beforeEach(() => {
console.error = () => { };
console.error = () => {};
jest.clearAllMocks();
wrapper.setProps({ data: [{ data: "novo" }] });
wrapper.vm.$attrs = { displayModeBar: "hover" };
Expand Down Expand Up @@ -271,7 +271,7 @@ describe("Plotly.vue", () => {
const { error } = console;

beforeEach(() => {
console.error = () => { };
console.error = () => {};
jest.clearAllMocks();
const attrs = Object.assign({}, vm.$attrs);
vm.$attrs = attrs;
Expand Down Expand Up @@ -327,9 +327,19 @@ describe("Plotly.vue", () => {
const changeLayout = () => wrapper.setProps({ layout: { novo: "layout" } });

describe.each([
[() => { changeData(); changeLayout(); }],
[() => { changeLayout(); changeData(); }],
])("when layout changes and data changes", (changes) => {
[
() => {
changeData();
changeLayout();
}
],
[
() => {
changeLayout();
changeData();
}
]
])("when layout changes and data changes", changes => {
beforeEach(() => {
jest.clearAllMocks();
changes();
Expand Down

0 comments on commit 61e97dc

Please sign in to comment.