myMusic
should be an array");'
- text: ''
testString: 'assert(myMusic.length > 1, "myMusic
should have at least two elements");'
- text: ''
testString: 'assert(typeof myMusic[1] === "object", "myMusic[1]
should be an object");'
- text: ''
testString: 'assert(Object.keys(myMusic[1]).length > 3, "myMusic[1]
should have at least 4 properties");'
- text: ''
testString: 'assert(myMusic[1].hasOwnProperty("artist") && typeof myMusic[1].artist === "string", "myMusic[1]
should contain an artist
property which is a string");'
- text: ''
testString: 'assert(myMusic[1].hasOwnProperty("title") && typeof myMusic[1].title === "string", "myMusic[1]
should contain a title
property which is a string");'
- text: ''
testString: 'assert(myMusic[1].hasOwnProperty("release_year") && typeof myMusic[1].release_year === "number", "myMusic[1]
should contain a release_year
property which is a number");'
- text: ''
testString: 'assert(myMusic[1].hasOwnProperty("formats") && Array.isArray(myMusic[1].formats), "myMusic[1]
should contain a formats
property which is an array");'
- text: ''
testString: 'assert(myMusic[1].formats.every(function(item) { return (typeof item === "string")}) && myMusic[1].formats.length > 1, "formats
should be an array of strings with at least two elements");'
```