-
Notifications
You must be signed in to change notification settings - Fork 533
noUiSlider unit test #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
6d10687
59d5036
2d2a819
cd7029f
2e7380f
e338e6d
dfef1f1
136b112
99b6a4d
4ab7a8e
c169cb3
42c9ea9
dea27a2
34a6401
e1b4126
00bfbda
ec93745
6e2fef0
a2665dd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
<template lang="jade"> | ||
div.slider | ||
div.slider(:disabled="disabled") | ||
</template> | ||
|
||
<script> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,5 +38,25 @@ describe("fieldNoUiSlider.vue", () => { | |
expect(input).to.be.defined; | ||
expect(input.classList.contains("slider")).to.be.true; | ||
}); | ||
|
||
before( () => { | ||
vm.$appendTo(document.body); | ||
}); | ||
|
||
it("should only test in the correct environment", (done) => { | ||
if (window.noUiSlider) { | ||
// make assertions | ||
it("should contain a complex div element", (done) => { | ||
vm.$nextTick( () => { | ||
expect(input).to.be.defined; | ||
expect(input.classList.contains("noui-target")).to.be.true; | ||
done(); | ||
}); | ||
}); | ||
|
||
} else { | ||
this.skip(); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think here, we throw an exception if noUISlider is not loaded instead of skip There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should I do something like this ?
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No, the check is good, but change the |
||
} | ||
}); | ||
}); | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Travis failed. Missing done()