Fixed case where there were no states defined

This commit is contained in:
squidfunk 2017-02-09 17:49:13 +01:00
parent 7e601d485a
commit 3e2fa37250
2 changed files with 15 additions and 14 deletions

View File

@ -31,7 +31,7 @@ node_js:
matrix: matrix:
include: include:
- node_js: 7 - node_js: 7
script: yarn run test:visual:run script: yarn run test:visual:run --no-clean
# Install a C++11 compatible compiler # Install a C++11 compatible compiler
addons: addons:

View File

@ -136,7 +136,8 @@ const generate = (dirname, components) => {
suite.setCaptureElements(component.capture) suite.setCaptureElements(component.capture)
/* Generate a subsuite for every state */ /* Generate a subsuite for every state */
for (const state of component.states) { const states = component.states || [{ name: "", wait: 0 }]
for (const state of states) {
const test = subsuite => { const test = subsuite => {
/* Resolve and apply relevant breakpoints */ /* Resolve and apply relevant breakpoints */