expressCart/test/specs/other.js

23 lines
424 B
JavaScript
Raw Normal View History

2019-11-09 12:14:56 +10:00
import{ serial as test }from'ava';
const {
runBefore,
g
} = require('../helper');
test.before(async () => {
await runBefore();
});
test('[Success] Check for sitemap.xml', async t => {
const res = await g.request
.get('/sitemap.xml')
.expect(200);
if(!res.text){
t.fail();
}
// Document should start with XML tag
t.deepEqual(res.text.substring(0, 5), '<?xml');
});