Closed simonmcmanus closed 7 years ago
Given the following spec the test component would be on both pages when loading index and clicking contact.
"/index.html": { page: 'home', spec: { '.test-area': { component: 'test' } } }, "/contact.html": { page: 'contact' },
Speclate should support a defaultState object which is merged with the page config so the test-area is reset for each page load:
"/index.html": { page: 'home', spec: { '.test-area': { component: 'test' } } }, "/contact.html": { page: 'contact' }, defaultState: { spec: { '.test-area': '' } }
Clicking index then contact should result in an empty test-area
Investigate https://github.com/simonmcmanus/speclate/issues/31 first
is this just needed in the client side router?
defaultSpec is now a thing.
Given the following spec the test component would be on both pages when loading index and clicking contact.
Speclate should support a defaultState object which is merged with the page config so the test-area is reset for each page load:
Clicking index then contact should result in an empty test-area
Investigate https://github.com/simonmcmanus/speclate/issues/31 first