{"id":295066,"date":"2019-11-23T03:00:16","date_gmt":"2019-11-23T03:00:16","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=295066"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=295066","title":{"rendered":"Puppeteer c ES6 \u0432 \u043d\u043e\u0434\u0435 \u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435, \u0438\u043b\u0438 \u043f\u043e\u0447\u0435\u043c\u0443 Zora \u044d\u0442\u043e \u043b\u0443\u0447\u0448\u0438\u0439 \u0442\u0435\u0441\u0442-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0432 \u0441\u0432\u043e\u0435\u0439 \u043d\u0438\u0448\u0435"},"content":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/466551\/\">\n<p>\u0412\u0441\u0435 \u0445\u043e\u0440\u043e\u0448\u043e, \u043f\u043e\u043a\u0430 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0433\u043d\u0430\u0442\u044c JS \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 \u0431\u0430\u0431\u0435\u043b\u0438-\u0448\u043c\u0430\u0431\u0435\u043b\u0438 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u0430\u043d\u0434\u043b\u0430, \u043d\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441\u0443\u0449\u0438\u0439 \u0430\u0434, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430 \u0438\u043b\u0438 \u0431\u0438\u0431\u0438\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0442\u0435\u0441\u0442-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u0437 \u043d\u043e\u0434\u044b \u0438\u043b\u0438\/\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u0432 ES5. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a E2E \u0442\u0435\u0441\u0442\u043e\u0432 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u043d\u0435 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0442\u0430\u043d\u0446\u044b \u0441 \u0431\u0443\u0431\u043d\u043e\u043c \u0442\u0440\u0430\u043d\u0441\u043f\u0438\u043b\u044f\u0446\u0438\u0439 \u0438 sourcemap-\u043e\u0432 \u0434\u043b\u044f \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u043a\u043e\u0434\u0430. \u0412\u044b \u0436\u0435 \u043d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u0447\u0442\u043e \u0431\u044b \u043e\u0448\u0438\u0431\u043a\u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438 \u043d\u0435 \u0442\u0443\u0434\u0430?<\/p>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/-b\/ap\/4s\/-bap4sw3txogxdeww4tsomrzffw.png\"><\/div>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043e\u043f\u0438\u0448\u0443 \u0441\u0432\u043e\u0439 \u043e\u043f\u044b\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Puppeteer \u0434\u043b\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438,<br \/>  \u0438 \u043a\u0430\u043a \u044f \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b ES6 \u043c\u043e\u0434\u0443\u043b\u0438 \u0432 \u043d\u043e\u0434\u0435 \u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435, \u0438\u043c\u0435\u044f \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u0438\u043d \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u0431\u0435\u0437 \u0441\u0431\u043e\u0440\u0449\u0438\u043a\u043e\u0432.<\/p>\n<p><a name=\"habracut\"><\/a>  <\/p>\n<p>\u0417\u0430\u0447\u0435\u043c \u0432\u043e\u043e\u0431\u0449\u0435 Puppeteer, \u0441\u043f\u0440\u043e\u0441\u0438\u0442\u0435 \u0432\u044b, \u043f\u043e\u0447\u0435\u043c\u0443 \u043d\u0435 WebDriver? \u041f\u0440\u043e\u0441\u0442\u043e \u044f \u0437\u0430\u043c\u0435\u0442\u0438\u043b, \u043a\u0430\u043a \u043c\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0441\u043e\u0437\u0434\u0430\u0442\u0435\u043b\u0438 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u043e\u043f\u0435\u043d\u0441\u043e\u0440\u0441 WebGL \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0443 \u043d\u0438\u0445 \u0435\u0441\u0442\u044c \u0432 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 300 \u0441\u0442\u0440\u0430\u043d\u0438\u0446 \u0441 \u043f\u0440\u0438\u043c\u0435\u0440\u0430\u043c\u0438, \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u0435\u0442 \u0441\u043b\u043e\u043c\u0430\u0442\u044c\u0441\u044f \u043f\u0440\u0438 \u043b\u044e\u0431\u043e\u043c \u043a\u043e\u043c\u043c\u0438\u0442\u0435. \u041e\u043d\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044e\u0442 \u0438\u0445 \u043f\u043e\u0441\u043b\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f, \u0438 \u0435\u0441\u043b\u0438 \u0447\u0442\u043e-\u0442\u043e \u0437\u0430\u0431\u044b\u043b\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044c \u2014 \u0438\u0437\u0432\u0438\u043d\u0438\u0442\u0435 <code>\u00af\\_(\u30c4)_\/\u00af<\/code>, \u0441\u043b\u043e\u043c\u0430\u043b\u043e\u0441\u044c. \u041a\u043e\u043b\u0438 \u043d\u0438\u043a\u0442\u043e \u0434\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u043d\u0435 \u0440\u0435\u0448\u0438\u043b \u0434\u0430\u043d\u043d\u0443\u044e \u0437\u0430\u0434\u0430\u0447\u0443, \u0442\u043e \u044f \u0440\u0435\u0448\u0438\u043b \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u043e, \u043f\u043e\u043a\u0430 \u0432 \u0441\u0432\u043e\u0435\u0439 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043b\u0438\u0431\u0435. \u041f\u0435\u0440\u0432\u0430\u044f \u043c\u044b\u0441\u043b\u044c \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u044b\u043b\u0430, \u044d\u0442\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c headless-gl, \u043d\u043e \u043e\u043d \u043c\u043e\u0440\u0430\u043b\u044c\u043d\u043e \u0443\u0441\u0442\u0430\u0440\u0435\u043b. Node-gles \u0443\u0436\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 WebGL2, \u043d\u043e \u043d\u0435 \u0440\u0435\u0434\u043a\u043e\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043d\u0438\u0435, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b. WebDriver? \u0414\u0430\u0436\u0435 \u043d\u0435 \u043f\u0440\u043e\u0431\u043e\u0432\u0430\u043b. \u041d\u0435 \u0443\u0432\u0435\u0440\u0435\u043d \u0447\u0442\u043e \u044d\u0442\u043e \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, python\/C#\/Java \u0431\u044b\u043b\u0438 \u043c\u043d\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u044b, \u0430 \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0441\u044f JS\/TS \u0441 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u043d\u043e\u0434\u043e\u0439 \u0438 \u0441 \u043d\u043e\u0432\u0435\u0439\u0448\u0438\u043c \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u043d\u044b\u043c API, \u0442\u0430\u043a \u0437\u0430\u043b\u0435\u0442\u0430\u044e\u0449\u0438\u0435 \u0444\u0438\u0447\u0438 \u043c\u043e\u0433\u0443\u0442 \u0431\u044b\u0442\u044c \u043f\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0439 \u0441\u043f\u0435\u043a\u0435.<\/p>\n<p>  <\/p>\n<p>\u041f\u043e\u0447\u0435\u043c\u0443 ES6 \u043c\u043e\u0434\u0443\u043b\u0438? \u041f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 WebGL \u0438 ES6 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0430\u0445 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0443\u0440\u043e\u0432\u043d\u0435. \u0410 \u0441 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438 \u0431\u0430\u043d\u0434\u043b \u0438\u043b\u0438 \u043d\u0435\u0442, \u043f\u0443\u0441\u0442\u044c \u0440\u0435\u0448\u0430\u0435\u0442 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c, \u043f\u0440\u043e\u0441\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u0442\u044c \u043e\u0431\u0435 \u0432\u0435\u0440\u0441\u0438\u0438. \u041d\u043e \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u043b\u044f \u044e\u043d\u0438\u0442 \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f, \u043e\u0447\u0435\u043d\u044c \u0443\u0434\u043e\u0431\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0432\u0435\u0440\u0441\u0438\u044e \u0438\u043c\u0435\u043d\u043d\u043e \u0441 \u043c\u043e\u0434\u0443\u043b\u044f\u043c\u0438, \u0442\u0430\u043a \u043a\u0430\u043a sourcemap-\u044b \u0434\u043e\u0431\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442\u043e, \u0430 \u0442\u0435\u0441\u0442\u044b \u043f\u043e\u0441\u043b\u0435 \u044d\u0442\u043e\u0433\u043e \u0431\u0435\u0437 \u043a\u0430\u043a\u0438\u0445 \u043b\u0438\u0431\u043e \u043b\u0438\u0448\u043d\u0438\u0445 \u0442\u0435\u043b\u043e\u0434\u0432\u0438\u0436\u0435\u043d\u0438\u0439 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043a\u0430\u043a \u0432 \u043d\u043e\u0434\u0435, \u0442\u0430\u043a \u0438 \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435. \u0417\u0430\u043f\u0443\u0441\u043a\u0430\u044f \u0438\u0445 \u0432 puppeteer, E2E \u0441 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u0435\u043c \u043a\u043e\u0434\u0430 \u0434\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0447\u0442\u0438 \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e. Typescript c \u0442\u0430\u0440\u0433\u0435\u0442\u043e\u043c \u0432 ES6 \u043d\u0430\u0432\u0435\u0440\u043d\u043e \u0431\u044b\u043b \u043d\u0443\u0436\u0435\u043d, \u043d\u043e \u043d\u0430 \u043c\u0430\u043b\u0435\u043d\u044c\u043a\u043e\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043f\u043e\u043a\u0440\u044b\u0442\u044b\u043c \u0442\u0435\u0441\u0442\u0430\u043c\u0438, \u043f\u043e\u0439\u0434\u0435\u0442 \u0438 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 js.<\/p>\n<p>  <\/p>\n<p>\u0418\u0442\u0430\u043a, \u0445\u0432\u0430\u0442\u0438\u0442 \u0432\u0432\u0435\u0434\u0435\u043d\u0438\u0439, \u044f \u043f\u043e\u0441\u0442\u0430\u0432\u0438\u043b \u0432 \u043f\u0440\u043e\u0435\u043a\u0442 <code>puppeteer<\/code> \u0438 <code>puppeteer-to-istanbul<\/code> \u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043b \u0442\u0430\u043a\u0443\u044e \u043e\u0431\u0435\u0440\u0442\u043a\u0443<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">\/\/ puppeteer.js  import puppeteer from 'puppeteer'; import pup2ist from 'puppeteer-to-istanbul';  (async () =&gt; {   const browser = await puppeteer.launch({     headless: process.env.HEADLESS, \/\/ headless customization     slowMo: 250                     \/\/ good fature for new configs   });   const page = (await browser.pages())[0];    \/\/ enable coverage   await page.coverage.startJSCoverage();   await page.coverage.startCSSCoverage();    \/\/ some additional code with console events here...    \/\/ navigate to unit test page   await page.goto('http:\/\/127.0.0.1:1234\/');    \/\/ disable coverage   const jsCoverage = await page.coverage.stopJSCoverage();   const cssCoverage = await page.coverage.stopCSSCoverage();   pup2ist.write([...jsCoverage, ...cssCoverage])    await new Promise(resolve =&gt; setTimeout(resolve, 6000));   await browser.close(); })();<\/code><\/pre>\n<p>  <\/p>\n<p>\u041a\u043e\u0442\u043e\u0440\u0443\u044e \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439 <code>node --experimental-modules --no-warnings .\/test\/puppeteer.js<\/code> \u0441 11+ \u043d\u043e\u0434\u043e\u0439, \u0438\u043b\u0438 \u0434\u0430\u0436\u0435 \u0431\u0435\u0437 \u0444\u043b\u0430\u0433\u043e\u0432 \u043d\u0430 node 13.2+. \u041a\u043e\u043d\u0435\u0447\u043d\u043e \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <code>require<\/code>, \u0442\u043e \u0441\u0435\u2026 \u041d\u043e \u0437\u0430\u0447\u0435\u043c? \u042d\u0442\u043e \u0436\u0435 \u0432\u043e\u043e\u0431\u0449\u0435 \u0431\u044d\u043a\u0435\u043d\u0434, \u0442\u0443\u0442 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0430 \u0443 \u043a\u043b\u0438\u0435\u043d\u0442\u043e\u0432 \u0434\u0430\u0436\u0435 \u043d\u0435 \u043d\u0443\u0436\u043d\u0430! \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u043a\u043e\u0434 \u0438\u0437 <code>package.json<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u043a\u0430\u0441\u0442\u043e\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c HEADLESS \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0443 \u0432 \u043a\u043e\u043d\u0441\u043e\u043b\u0438 \u0438 \u0432 CI \u043e\u0431\u043b\u0430\u043a\u0435, \u0435\u0441\u043b\u0438 \u0442\u0440\u0435\u0431\u0443\u044e\u0442\u0441\u044f \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0434\u043b\u044f \u043d\u0438\u0445. \u0412 travs\/circle-ci \u043d\u0430\u0432\u0435\u0440\u043d\u043e \u0431\u0443\u0434\u0435\u0442 \u0441\u0442\u043e\u044f\u0442\u044c linux \u0438 \u043c\u043e\u0436\u043d\u043e \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c \u0442\u0430\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0441\u0440\u0435\u0434\u044b \u0432 \u0442\u0430\u043a\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435. <code>concurrently<\/code> \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u0442 \u043f\u0430\u0440\u0430\u043b\u043b\u0435\u043b\u044c\u043d\u043e \u0434\u0432\u0430 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430 \u0432 \u043e\u0434\u043d\u043e\u0439 \u043a\u043e\u043d\u0441\u043e\u043b\u0438.<\/p>\n<p>  <\/p>\n<pre><code class=\"json\">\/\/ package.json {   \/\/bla-bla...    \"type\": \"module\",      \/\/ this line indicates that we are using es6 modules   \"scripts\": {     \"test\": \"node --experimental-modules --no-warnings .\/test\/puppeteer.js\",     \"server\": \"http-server -c-1 -p 1234\",     \"not-bad-cmd--dude\": \"concurrently -k -s first \\\"npm:test\\\" \\\"npm:server\\\"\",     \"ci\": \"HEADLESS=true concurrently -k -s first \\\"npm:test\\\" \\\"npm:server\\\"\",   } }<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u0430 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u043c\u0430\u0448\u0438\u043d\u0435 \u043f\u043e\u0441\u043b\u0435 \u0432\u0432\u043e\u0434\u0430 \u043a\u043e\u043c\u0430\u043d\u0434\u044b <code>npm run server<\/code> \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f http \u0441\u0435\u0440\u0432\u0435\u0440, \u0430 \u043d\u0430 <code>npm run test<\/code> puppeteer \u0432 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u043c \u043e\u043a\u043d\u0435 \u043e\u043a\u043d\u0435 \u0445\u0440\u043e\u043c\u0430. \u0412\u043e\u0442 \u0432 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u0435 \u0438 \u0432\u0441\u0435 \u0447\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0437\u043d\u0430\u0442\u044c \u043f\u0440\u043e puppeteer. \u0414\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0438\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u044b \u043f\u043e \u0441\u043a\u0440\u0438\u043d\u0448\u043e\u0442\u0430\u043c, \u044d\u043c\u0443\u043b\u044f\u0446\u0438\u044f\u043c \u0434\u0435\u0432\u0430\u0439\u0441\u043e\u0432, \u0430\u0434\u043c\u0438\u043d\u043a\u0430\u043c \u0438 \u0442.\u0434., \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u044b <a href=\"https:\/\/github.com\/checkly\/puppeteer-examples\">\u0442\u0443\u0442<\/a>. \u041a\u0441\u0442\u0430\u0442\u0438, \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043f\u0430\u043a\u0435\u0442\u043e\u043c <code>puppeteer<\/code> \u0432\u0430\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043b\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0445\u0440\u043e\u043c \u0432 <code>node_modules<\/code>, \u0435\u0441\u043b\u0438 \u043e\u043d \u0432\u0430\u043c \u043d\u0435 \u043d\u0443\u0436\u0435\u043d, \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u0435 \u0435\u0433\u043e \u043d\u0430 <code>puppeteer-core<\/code> \u0438\u043b\u0438 <code>puppeteer-firefox<\/code>. \u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c \u0447\u0442\u043e \u0432 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0432\u044b\u0448\u0435 \u043c\u044b \u0431\u0435\u0441\u043f\u043b\u0430\u0442\u043d\u043e \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 JS\/CSS \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u0435 \u043a\u043e\u0434\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043f\u0438\u0448\u0435\u0442\u0441\u044f \u0432 \u043f\u0430\u043f\u043a\u0443 .nyc_output, \u043f\u043e\u043a\u0430 \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u0437\u0430\u043e\u0441\u0442\u0440\u044f\u0442\u044c \u043d\u0430 \u044d\u0442\u043e\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u043c \u044d\u0442\u0430\u043f\u0435 \u043d\u0430\u043c \u043e\u0442 \u044d\u0442\u043e\u0433\u043e \u043d\u0435 \u0445\u043e\u043b\u043e\u0434\u043d\u043e \u043d\u0435 \u0436\u0430\u0440\u043a\u043e, \u043d\u043e \u0435\u0441\u043b\u0438 \u0447\u0442\u043e \u2014 \u043e\u043d\u043e \u0442\u0430\u043c \u0435\u0441\u0442\u044c, \u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u043f\u043e\u0447\u0442\u0438 \u0433\u043e\u0442\u043e\u0432\u0430 \u043a \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440\u0443.<\/p>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/7p\/1a\/ub\/7p1aubzvuejnelkrcqktlhwvwci.png\"><\/div>\n<p>  <\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0441\u0430\u043c\u0438\u043c \u0442\u0435\u0441\u0442\u0430\u043c, \u043f\u044b\u0442\u0430\u044f\u0441\u044c \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0432 \u0447\u0435\u043c \u044f \u0431\u0443\u0434\u0443 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c E2E \u0432 \u043c\u043e\u0435\u0439 \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043b\u0438\u0431\u0435, \u044f \u043d\u0430\u0442\u043a\u043d\u0443\u043b\u0441\u044f \u043d\u0430 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0438, \u0433\u0434\u0435 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u043b\u0438 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u043e\u0432 \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u041d\u0430\u0432\u0435\u0440\u043d\u043e, \u0432\u0440\u0435\u043c\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043d\u0435 \u0442\u0430\u043a \u0432\u0430\u0436\u043d\u043e, \u043d\u043e \u043a\u043e\u0433\u0434\u0430 \u043a\u0430\u043a\u043e\u0439 \u043d\u0438\u0431\u0443\u0434\u044c Jest \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442 \u0438\u0445 \u0432 10 \u0440\u0430\u0437 \u043c\u0435\u0434\u043b\u0435\u043d\u043d\u0435\u0435, \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u0435\u0442 \u0432\u043e\u043f\u0440\u043e\u0441 &#171;\u0447\u0442\u043e \u044d\u0442\u043e, \u0438 \u0437\u0430\u0447\u0435\u043c \u044d\u0442\u043e \u043d\u0443\u0436\u043d\u043e&#187;. \u041e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u0440\u0438\u0442\u0435\u0440\u0438\u0439 \u0432\u044b\u0431\u043e\u0440\u0430 \u044d\u0442\u043e \u0431\u044b\u043b \u0437\u0430\u043f\u0443\u0441\u043a es6 \u0441\u043e \u0441\u0442\u0440\u043e\u0447\u043a\u043e\u0439 <code>&lt;script type=\"module\" src=\".\/test.js\"&gt;&lt;\/script&gt;<\/code> \u0432 html \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435. \u0422\u0430\u043a \u043a\u0430\u043a \u043d\u0430 \u043c\u043e\u043c\u0435\u043d\u0442 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u044f \u043c\u043e\u0435\u0433\u043e \u043a\u043e\u0434\u0430, \u043d\u043e\u0434\u0430 \u0435\u0449\u0435 \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u043b\u0430 \u0432 \u043f\u043e\u043b\u043d\u043e\u0439 \u043c\u0435\u0440\u0435 ES6 (\u0432\u0447\u0435\u0440\u0430 \u0432\u044b\u0448\u043b\u0430 12.3 \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0441\u043d\u044f\u043b\u0438 \u0444\u043b\u0430\u0433\u0438). \u042f \u0440\u0435\u0448\u0438\u043b, \u0447\u0442\u043e \u0435\u0441\u043b\u0438 \u0432\u0437\u044f\u0442\u044c \u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0430\u043c\u0438 \u043d\u0430 TS \u0438\u043b\u0438 \u0436\u0435 ES6+, \u0442\u043e \u043e\u043d\u043e \u0442\u043e\u0447\u043d\u043e \u0434\u043e\u043b\u0436\u043d\u043e \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0442\u044c\u0441\u044f. \u0412\u043e\u043e\u0431\u0449\u0435, \u043d\u0430\u0432\u0435\u0440\u043d\u043e\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0432\u0437\u044f\u0442\u044c \u043a\u0430\u043a\u043e\u0439 \u043d\u0438\u0431\u0443\u0434\u044c mocha, \u043e\u0431\u044a\u044f\u0432\u0438\u0442\u044c \u0435\u0433\u043e \u0432\u044b\u0448\u0435 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u0438 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u043a \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043d\u043e\u043c\u0443 \u043a\u043b\u0430\u0441\u0441\u0443, \u043d\u043e \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0435\u0441\u043b\u0438 \u0432\u044b\u043f\u0430\u0434\u0435\u0442 \u043e\u0448\u0438\u0431\u043a\u0430? \u0412 \u043e\u0431\u0449\u0435\u043c, \u043c\u043e\u0436\u0435\u0442\u0435 \u043d\u0430\u0437\u0432\u0430\u0442\u044c \u0441\u0432\u043e\u0439 \u043b\u044e\u0431\u0438\u043c\u044b\u0439 \u0442\u0435\u0441\u0442 \u0440\u0430\u043d\u043d\u0435\u0440 \u0442\u0443\u0442. \u042f \u043b\u0438\u0448\u044c \u0441\u043a\u0430\u0436\u0443 \u0447\u0442\u043e Zora \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 TAP \u0444\u043e\u0440\u043c\u0430\u0442, \u0438 \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442 \u0434\u043b\u044f \u043d\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u0442 \u0446\u0435\u043b\u044b\u0439 \u0437\u043e\u043e\u043f\u0430\u0440\u043a TAP \u043f\u043e\u0436\u0438\u0440\u0430\u0442\u0435\u043b\u0435\u0439. \u0412 \u043d\u0435\u0439 \u0435\u0441\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u0430\u0441\u0441\u0435\u0440\u0442\u043e\u0432, \u043e\u043d\u0430 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442 async, \u043e\u043d\u0430 \u043e\u0434\u043d\u0430 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0431\u044b\u0441\u0442\u0440\u044b\u0445, \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u043d\u0430 \u0447\u0438\u0441\u0442\u043e\u043c ES6 \u0431\u0435\u0437 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0435\u0439 \u043e\u0442 \u0441\u0430\u043c\u043e\u0439 \u043d\u043e\u0434\u044b. \u041c\u043d\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430\u0441\u044c \u043e\u043d\u0430 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u043c \u0431\u0440\u0438\u043b\u043b\u0438\u0430\u043d\u0442\u043e\u043c \u0434\u043b\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432.<\/p>\n<p>  <\/p>\n<p>\u0412 \u0438\u0442\u043e\u0433\u0435 \u0443 \u043c\u0435\u043d\u044f \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438\u0441\u044c \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u0442\u0430\u043a\u0438\u0435 \u0442\u0435\u0441\u0442\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u044e\u0442 \u043a\u0430\u043a \u0432 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435 \u0442\u0430\u043a \u0438 \u0432 \u043d\u043e\u0434\u0435. \u0412 <a href=\"https:\/\/github.com\/lorenzofox3\/zora\">\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a> \u043f\u043e Zora \u0435\u0441\u0442\u044c \u0438\u0441\u0447\u0435\u0440\u043f\u044b\u0432\u0430\u044e\u0449\u0430\u044f \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u044f \u043f\u043e \u0430\u0441\u0441\u0435\u0440\u0442\u0430\u043c \u0438 \u0433\u0440\u0443\u043f\u043f\u0438\u0440\u043e\u0432\u043a\u0430\u043c \u043a\u043e\u043c\u0430\u043d\u0434.<\/p>\n<p>  <\/p>\n<pre><code class=\"javascript\">\/\/ test.js import MyLibrary from '..\/dist\/my-library.module.js'; import { test } from 'https:\/\/cdn.jsdelivr.net\/npm\/zora@3.0.3\/dist\/bundle\/module.js';  test('CPU', async (t) =&gt; {   \/\/ some stuff here   t.ok(tfps != null, 'fps = ' + (tfps != null ? tfps.toFixed(1) : 'null'));   t.ok(tcpu != null, 'cpu = ' + (tcpu != null ? tcpu.toFixed(1) : 'null')); });  test('Memory', async (t) =&gt; {   \/\/ some stuff here   t.ok(tmem != null, 'mem = ' + (tmem != null ? tmem.toFixed(1) : 'null')); });  \/\/ etc...<\/code><\/pre>\n<p>  <\/p>\n<p>\u0414\u043b\u044f \u0442\u043e\u0433\u043e \u0447\u0442\u043e \u0431\u044b \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u044c \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u0431\u0435\u0437 \u0441\u0431\u043e\u0440\u043e\u043a, \u043c\u043d\u0435 \u043f\u0440\u0438\u0448\u043b\u043e\u0441\u044c \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u0441\u043d\u0438\u0444\u0435\u0440. \u0413\u043e\u043b\u0430\u044f \u043a\u043e\u043d\u0441\u043e\u043b\u044c \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0431\u0435\u043b\u044c\u043d\u0430, \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c TAP \u0432\u044b\u0432\u043e\u0434 \u043a\u0443\u0434\u0430-\u043d\u0438\u0431\u0443\u0434\u044c \u0434\u043b\u044f \u043d\u0430\u0432\u0435\u0434\u0435\u043d\u0438\u044f \u043c\u0430\u0440\u0430\u0444\u0435\u0442\u0430. \u041d\u043e \u0441\u0430\u043c\u043e\u0435 \u0437\u0430\u0431\u0430\u0432\u043d\u043e\u0435 \u2014 \u044d\u0442\u043e \u0442\u043e, \u0447\u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u0442\u0435\u0441\u0442\u043e\u0432 \u043d\u0430 \u0432\u0430\u0448\u0435\u043c \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0432 <a href=\"https:\/\/munrocket.github.io\/gl-bench\/test\/unit-test.html\">\u043e\u043d\u043b\u0430\u0439\u043d\u0435<\/a>. \u0422\u0430\u043a \u0436\u0435, \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u044d\u0442\u043e\u0442 \u0436\u0435 \u043a\u043e\u0434 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0432 CI \u043f\u043e \u043b\u044e\u0431\u043e\u043c\u0443 \u043a\u043e\u043c\u043c\u0438\u0442\u0443.<\/p>\n<p>  <\/p>\n<pre><code class=\"html\">&lt;!DOCTYPE html&gt; &lt;html lang=\"en\"&gt; &lt;head&gt;   &lt;!-- some declarations in head --&gt; &lt;\/head&gt; &lt;body&gt;   &lt;!-- some declarations in body --&gt;    &lt;script&gt;     const addSniffer = (spyTarget) =&gt; function() {       spyTarget.apply(window.console, arguments);       sniffer([...arguments]);     }     window.console.log = addSniffer(window.console.log);     window.console.error = addSniffer(window.console.error);      let screen = document.getElementById('screen');     function sniffer(string) {       let screen = document.getElementById(\"screen\");       string.forEach(line =&gt; {         let div = document.createElement(\"div\");         let text = document.createTextNode(line);         div.appendChild(text)         screen.appendChild(div);       });     }   &lt;\/script&gt;    &lt;script type=\"module\" src=\".\/test.js\"&gt;&lt;\/script&gt;  &lt;\/body&gt; &lt;\/html&gt;<\/code><\/pre>\n<p>  <\/p>\n<p>\u041d\u043e \u044d\u0442\u043e \u0435\u0449\u0435 \u043d\u0435 \u0432\u0441\u0435, \u0438\u043c\u0435\u044f \u0433\u043e\u0442\u043e\u0432\u044b\u0435 \u0442\u0435\u0441\u0442\u044b, \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0442\u0430\u043a\u0438\u0445 \u0431\u043e\u0442\u043e\u0432 \u043a\u0430\u043a renovate\/greenkeeper\/dependabot, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b \u043e\u0431\u043d\u043e\u0432\u043b\u044f\u043b\u0438 \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u0432 \u0432\u0430\u0448\u0435\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435, \u0438 \u0434\u0435\u043b\u0430\u043b\u0438 \u0430\u0432\u0442\u043e\u043a\u043e\u043c\u043c\u0438\u0442\u044b, \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u044f \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0441\u0442\u044c \u043e\u0431\u043d\u043e\u0432\u043b\u0435\u043d\u0438\u0439. \u0410 travis\/github-ci\/circle-ci \u0431\u044b \u0432\u044b\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u043b\u0438 \u0431\u044b \u043d\u043e\u0432\u0443\u044e \u0432\u0435\u0440\u0441\u0438\u044e npm \u043f\u0430\u043a\u0435\u0442\u043e\u0432.<\/p>\n<p>  <\/p>\n<p>\u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 \u0442\u0430\u043a\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433 \u043e\u0442 renovate, \u0434\u0435\u043b\u0430\u0435\u0442 \u0430\u0432\u0442\u043e\u043a\u043e\u043c\u043c\u0438\u0442\u044b \u043f\u043e \u0432\u043e\u0441\u043a\u0440\u0435\u0441\u0435\u043d\u044c\u044f\u043c, \u0438 \u043f\u043e\u0434\u043d\u0438\u043c\u0430\u0435\u0442 \u0432\u0435\u0440\u0441\u0438\u044e<\/p>\n<p>  <\/p>\n<pre><code class=\"json\">{   \"automerge\": true,   \"automergeType\": \"branch\",   \"bumpVersion\": \"patch\",   \"schedule\": [\"on sunday\"],   \"ignorePaths\": [\".circleci\"] }<\/code><\/pre>\n<p>  <\/p>\n<p>\u0410 travis, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u0441\u0430\u043c\u0438 \u043f\u043e\u0434\u043d\u044f\u043b\u0438 \u0432\u0435\u0440\u0441\u0438\u044e \u0438\u043b\u0438 \u0436\u0435 \u043a\u0430\u043a\u043e\u0439 \u0442\u043e \u0431\u043e\u0442, \u043c\u043e\u0436\u0435\u0442 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u043e\u043c \u0432\u044b\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u043f\u0430\u043a\u0435\u0442 \u0432 npm. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0430\u043a\u043a\u0430\u0443\u043d\u0442 \u043d\u0430 <code>travis-ci.org<\/code>, \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c f2a \u043a\u0430\u043a \u043e\u043f\u0438\u0441\u0430\u043d\u043e \u0432 <a href=\"https:\/\/tailordev.fr\/blog\/2018\/03\/15\/automated-npm-releases-with-travis-ci\/\">\u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435<\/a>, \u0432\u0432\u0435\u0441\u0442\u0438 \u0434\u0432\u0430 \u0441\u0435\u043a\u0440\u0435\u0442\u043d\u044b\u0445 \u043a\u043b\u044e\u0447\u0430 <code>$NPM_EMAIL<\/code> \u0438 <code>$NPM_TOKEN<\/code>, \u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u043a\u043e\u043d\u0444\u0438\u0433.<\/p>\n<p>  <\/p>\n<pre><code class=\"plaintext\">language: node_js node_js: '12'  script:   - npm run ci  deploy:   provider: npm   email: $NPM_EMAIL   api_key: $NPM_TOKEN   on:     branch: master<\/code><\/pre>\n<p>  <\/p>\n<p>\u0418\u0442\u043e\u0433\u043e, \u043a\u0430\u043a-\u0442\u043e \u0442\u0430\u043a \u043c\u043e\u0436\u043d\u043e, \u043d\u043e \u0441\u043b\u043e\u0436\u043d\u043e \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u0441\u044f \u043e\u0442 \u043e\u043f\u043e\u0432\u0435\u0449\u0435\u043d\u0438\u0439 \u043e\u0442 \u0433\u0438\u0442\u0445\u0430\u0431\u0430 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u0432 \u043a\u0430\u043a\u043e\u0439-\u0442\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043f\u043e\u044f\u0432\u0438\u043b\u0430\u0441\u044c \u0443\u044f\u0437\u0432\u0438\u043c\u043e\u0441\u0442\u044c \ud83d\ude00<\/p>\n<\/div>\n<p>               <script class=\"js-mediator-script\">!function(e){function t(t,n){if(!(n in e)){for(var r,a=e.document,i=a.scripts,o=i.length;o--;)if(-1!==i[o].src.indexOf(t)){r=i[o];break}if(!r){r=a.createElement(\"script\"),r.type=\"text\/javascript\",r.async=!0,r.defer=!0,r.src=t,r.charset=\"UTF-8\";var d=function(){var e=a.getElementsByTagName(\"script\")[0];e.parentNode.insertBefore(r,e)};\"[object Opera]\"==e.opera?a.addEventListener?a.addEventListener(\"DOMContentLoaded\",d,!1):e.attachEvent(\"onload\",d):d() } } }t(\"\/\/mediator.mail.ru\/script\/2820404\/\",\"_mediator\")}(window);<\/script>      <br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/466551\/\"> https:\/\/habr.com\/ru\/post\/466551\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html js-mediator-article\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/466551\/\">\n<p>\u0412\u0441\u0435 \u0445\u043e\u0440\u043e\u0448\u043e, \u043f\u043e\u043a\u0430 \u0432\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u0440\u043e\u0433\u043d\u0430\u0442\u044c JS \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a\u0438 \u0447\u0435\u0440\u0435\u0437 \u0431\u0430\u0431\u0435\u043b\u0438-\u0448\u043c\u0430\u0431\u0435\u043b\u0438 \u0434\u043b\u044f \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u0430\u043d\u0434\u043b\u0430, \u043d\u043e \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441\u0443\u0449\u0438\u0439 \u0430\u0434, \u043a\u043e\u0433\u0434\u0430 \u0432\u044b \u0437\u0430\u0445\u043e\u0442\u0438\u0442\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0442\u0435\u0441\u0442\u044b \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u0441\u0430\u0439\u0442\u0430 \u0438\u043b\u0438 \u0431\u0438\u0431\u0438\u043b\u0438\u043e\u0442\u0435\u043a\u0438. \u041f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u0432\u0441\u0435 \u0442\u0435\u0441\u0442-\u0444\u0440\u0435\u0439\u043c\u0432\u043e\u0440\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438\u0437 \u043d\u043e\u0434\u044b \u0438\u043b\u0438\/\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u0432 ES5. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0437\u0430\u043f\u0443\u0441\u043a E2E \u0442\u0435\u0441\u0442\u043e\u0432 \u0441\u0442\u0430\u043d\u043e\u0432\u044f\u0442\u0441\u044f \u043d\u0435 \u0442\u0440\u0438\u0432\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u0438 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0442\u0430\u043d\u0446\u044b \u0441 \u0431\u0443\u0431\u043d\u043e\u043c \u0442\u0440\u0430\u043d\u0441\u043f\u0438\u043b\u044f\u0446\u0438\u0439 \u0438 sourcemap-\u043e\u0432 \u0434\u043b\u044f \u043f\u043e\u043a\u0440\u044b\u0442\u0438\u044f \u043a\u043e\u0434\u0430. \u0412\u044b \u0436\u0435 \u043d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u0447\u0442\u043e \u0431\u044b \u043e\u0448\u0438\u0431\u043a\u0438 \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0438 \u043d\u0435 \u0442\u0443\u0434\u0430?<\/p>\n<p>  <\/p>\n<div style=\"text-align:center;\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/-b\/ap\/4s\/-bap4sw3txogxdeww4tsomrzffw.png\"><\/div>\n<p>  <\/p>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u043e\u043f\u0438\u0448\u0443 \u0441\u0432\u043e\u0439 \u043e\u043f\u044b\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f Puppeteer \u0434\u043b\u044f \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438,<br \/>  \u0438 \u043a\u0430\u043a \u044f \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u043b ES6 \u043c\u043e\u0434\u0443\u043b\u0438 \u0432 \u043d\u043e\u0434\u0435 \u0438 \u0431\u0440\u0430\u0443\u0437\u0435\u0440\u0435, \u0438\u043c\u0435\u044f \u0432\u0441\u0435\u0433\u043e \u043e\u0434\u0438\u043d \u0438\u0441\u0445\u043e\u0434\u043d\u0438\u043a \u0434\u043b\u044f \u0442\u0435\u0441\u0442\u043e\u0432 \u0431\u0435\u0437 \u0441\u0431\u043e\u0440\u0449\u0438\u043a\u043e\u0432.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-295066","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/295066","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=295066"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/295066\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=295066"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=295066"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=295066"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}