1.0.0 • Published 5 years ago

test-url v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

Test URL

Manually check if a URL renders properly while testing.

Install

npm install --save test-url

Usage

The URL will be opened in a browser via puppeteer, if everything looks alright just close the browser, if something is wrong stop testing.

import testURL from 'test-url';

async function runTests () {

  // Some other tests...

  const url = `file://${encodeURI ( __dirname )}/index.html`;

  await testURL ( url ); // Opening the URL, waiting for the browser to be closed

}

runTests ();

License

MIT © Fabio Spampinato