UNPKG

477 BJavaScriptView Raw
1//
2// testem looks for a function called getTestemId, and if present, uses it to
3// determine the ID of this test run so it can communicate back to the testem
4// server -- see https://github.com/testem/testem/commit/4a51acc2fc0c3a23273fea838fd166b4691c2300.
5//
6// The testemId query param is added to the test URL by test-runner.js.
7//
8window.getTestemId = function () {
9 let match = window.location.search.match(/[?&]testemId=([^?&]+)/);
10 return match ? match[1] : null;
11};