Skip to content

Instantly share code, notes, and snippets.

@monkrus
Last active February 5, 2021 13:29
Show Gist options
  • Select an option

  • Save monkrus/ca0b53752303fccfb06c389de33aac5e to your computer and use it in GitHub Desktop.

Select an option

Save monkrus/ca0b53752303fccfb06c389de33aac5e to your computer and use it in GitHub Desktop.
var cheerio = require('cheerio');
const $ = cheerio.load(pm.response.text());
pm.test('Page title should be set', function () {
pm.expect($('title').text()).to.equal('Snapshot');
pm.expect($(''))
});
pm.test('Page should have header and footer tags', function () {
pm.expect($('header')).to.exist;
pm.expect($('footer')).to.exist;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment