npm.io
1.0.0 • Published 7 years ago

test-url

Licence
MIT
Version
1.0.0
Deps
0
Size
8 kB
Vulns
0
Weekly
0
Stars
1

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