@shopmacher/flash
Advanced tools
Comparing version 1.0.0-beta.3 to 1.0.0-beta.5
{ | ||
"name": "@shopmacher/flash", | ||
"version": "1.0.0-beta.3", | ||
"version": "1.0.0-beta.5", | ||
"description": "Library for displaying flash/toast messages", | ||
@@ -34,3 +34,3 @@ "keywords": [ | ||
"pretest": "npm run build", | ||
"prepare": "npm run clean && npm run format:check && npm run lint && npm test" | ||
"prepare": "npm run clean && npm run format:check && npm run lint" | ||
}, | ||
@@ -37,0 +37,0 @@ "devDependencies": { |
@@ -50,3 +50,5 @@ /** | ||
show() { | ||
this.$root.classList.add('visible'); | ||
window.requestAnimationFrame(() => { | ||
this.$root.classList.add('visible'); | ||
}); | ||
} | ||
@@ -58,3 +60,5 @@ | ||
hide() { | ||
this.$root.classList.remove('visible'); | ||
window.requestAnimationFrame(() => { | ||
this.$root.classList.remove('visible'); | ||
}); | ||
} | ||
@@ -61,0 +65,0 @@ |
@@ -58,6 +58,8 @@ import Flash from './Flash'; | ||
let $root = null; | ||
let window = null; | ||
let instance = null; | ||
beforeEach(() => { | ||
const { document } = createBasicMarkup(); | ||
window = createBasicMarkup(); | ||
const { document } = window; | ||
$root = document.querySelector('.sm-flash'); | ||
@@ -79,5 +81,9 @@ instance = new Flash($root); | ||
$root.classList.remove('visible'); | ||
window.requestAnimationFrame = () => { | ||
}; | ||
instance.show(); | ||
const contains = $root.classList.contains('visible'); | ||
expect(contains).toBe(true); | ||
}); | ||
@@ -84,0 +90,0 @@ |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
12218
9
276
1