export default { get props() { return { thePromise: new Promise((_) => {}) }; }, html: ` loading... `, async test({ assert, component, target }) { await (component.thePromise = Promise.resolve([1, 2, 3, 4, 5, 6, 7, 8])); assert.htmlEqual( target.innerHTML, `

a: 1

b: 2

c: 5

remaining length: 3

` ); await (component.thePromise = Promise.resolve([9, 10, 11, 12, 13, 14, 15])); assert.htmlEqual( target.innerHTML, `

a: 9

b: 10

c: 13

remaining length: 2

` ); try { await (component.thePromise = Promise.reject([16, 17, 18, 19, 20, 21, 22])); } catch (e) { // do nothing } assert.htmlEqual( target.innerHTML, `

c: 16

d: 17

e: 18

f: 19

g: 22

` ); try { await (component.thePromise = Promise.reject([23, 24, 25, 26, 27, 28, 29, 30, 31])); } catch (e) { // do nothing } assert.htmlEqual( target.innerHTML, `

c: 23

d: 24

e: 25

f: 26

g: 29

` ); } };