Allow lists of tests
bahmutov opened this issue ยท comments
Gleb Bahmutov commented
Right now to create several tests we can use name as key in an object, which is weird
import { source } from 'common-tags'
export default {
'cy.wrap()': {
'detects when property gets added to an object': {
test: source`
// an object without a property
const o = {}
// property "id" gets added after a delay
setTimeout(() => {
o.id = 'abc123'
}, 500)
// detects when property "id" get added to the object "o"
cy.wrap(o).should('have.property', 'id')
`
},
I would like to list tests in an array, and use name
property
import { source } from 'common-tags'
export default {
'cy.wrap()': [{
name: 'detects when property gets added to an object',
test: source`
// an object without a property
const o = {}
// property "id" gets added after a delay
setTimeout(() => {
o.id = 'abc123'
}, 500)
// detects when property "id" get added to the object "o"
cy.wrap(o).should('have.property', 'id')
`
},
// second test
Gleb Bahmutov commented
๐ This issue has been resolved in version 1.0.0 ๐
The release is available on:
Your semantic-release bot ๐ฆ๐