spy-client 2.1.15 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.travis.yml +7 -4
- package/AGENTS.md +132 -0
- package/README.md +27 -19
- package/dist/head/base.d.ts +27 -26
- package/dist/head/error.d.ts +6 -6
- package/dist/head/observer.d.ts +5 -5
- package/dist/head/whitescreen.d.ts +6 -6
- package/dist/lib/data.d.ts +6 -6
- package/dist/lib/huffman.d.ts +9 -9
- package/dist/lib/interface.d.ts +209 -209
- package/dist/lib/spyHeadInterface.d.ts +36 -36
- package/dist/lib/util.d.ts +22 -22
- package/dist/module/fid.d.ts +15 -15
- package/dist/module/layoutShift.d.ts +18 -18
- package/dist/module/lcp.d.ts +17 -17
- package/dist/module/longtask.d.ts +46 -46
- package/dist/module/memory.d.ts +11 -11
- package/dist/module/navigatorInfo.d.ts +9 -9
- package/dist/module/resource.d.ts +39 -39
- package/dist/module/timing.d.ts +11 -11
- package/dist/module/tti.d.ts +19 -19
- package/dist/spy-client-basic.d.ts +118 -118
- package/dist/spy-client-basic.esm.js +298 -298
- package/dist/spy-client-basic.iife.js +298 -298
- package/dist/spy-client-basic.iife.min.js +1 -1
- package/dist/spy-client-basic.js +298 -298
- package/dist/spy-client-basic.min.js +1 -1
- package/dist/spy-client-basic.mjs +298 -298
- package/dist/spy-client.d.ts +32 -32
- package/dist/spy-client.esm.js +1430 -1423
- package/dist/spy-client.iife.js +1430 -1423
- package/dist/spy-client.iife.min.js +1 -1
- package/dist/spy-client.js +1430 -1423
- package/dist/spy-client.min.js +1 -1
- package/dist/spy-client.mjs +1430 -1423
- package/dist/spy-head.d.ts +6 -6
- package/dist/spy-head.js +359 -358
- package/dist/spy-head.min.js +1 -1
- package/dist/spy-local-cache.d.ts +18 -18
- package/dist/spy-local-cache.js +718 -711
- package/dist/spy-local-cache.min.js +1 -1
- package/package.json +26 -73
- package/test-results/.last-run.json +4 -0
- package/karma.conf.js +0 -111
|
@@ -1 +1 @@
|
|
|
1
|
-
(
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).SpyLocalCache=e()}(this,function(){"use strict";var t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)};function e(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function o(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(o.prototype=r.prototype,new o)}"function"==typeof SuppressedError&&SuppressedError;var r=function(){function t(t,e){this.data=t,this.weight=e}return t.prototype.preOrder=function(t){t.push(this),this.left&&this.left.preOrder(t),this.right&&this.right.preOrder(t)},t}();function o(t){var e=function(t){for(var e=[],o={},n=0,i=t;n<i.length;n++){var a=i[n];null==o[a]?o[a]=1:o[a]++}for(var s=0,u=Object.entries(o);s<u.length;s++){var c=u[s],h=c[0],l=c[1];e.push(new r(h,l))}return e}(t),o=function(t){for(var e=function(t,e){return t.weight-e.weight};t.length>1;){t.sort(e);var o=t.shift(),n=t.shift();if(o&&n){var i=new r(null,o.weight+n.weight);i.left=o,i.right=n,t.unshift(i)}}return t.shift()}(e),n=function(t){if(null==t)return null;var e={};return function t(r,o,n){var i=[].concat(n);i.push(o),null!=r&&(null==r.data?(t(r.left,"0",i),t(r.right,"1",i)):e[r.data]=i.join(""))}(t,"",[]),e}(o),i=function(t,e){for(var r=[],o=0,n=t;o<n.length;o++){var i=n[o];r.push(e[i])}return r}(t,n);return{result:function(t){for(var e=t.join(""),r=Math.ceil(e.length/8),o=new Array(r+1),n=0,i="",a=0;a<e.length;a+=8)i=e.substring(a,a+8),o[n]=parseInt(i,2),n++;return o[n]=i.length,o}(i),codes:n}}function n(t,e){t&&(e|=256);var r=Number(e).toString(2);return t?r.substring(r.length-8):r}function i(t){for(var e=[],r=0;r<t.length;r++)e.push(t.charCodeAt(r));return e}function a(t){for(var e="",r=0,o=t;r<o.length;r++){var n=o[r];e+=String.fromCharCode(n)}return e}function s(t,e){return a(function(t,e){for(var r=[],o=0;o<e.length-1;o++){var i=o!==e.length-2;r.push(n(i,e[o]))}var a=r[r.length-1],s=e[e.length-1];a="00000000".substring(8-(s-a.length))+a,r[r.length-1]=a;for(var u={},c=0,h=Object.entries(t);c<h.length;c++){var l=h[c],f=l[0];u[l[1]]=f}var p=r.join(""),d=[],g=p.length;for(o=0;o<g;){for(var v=1,y=(i=!0,null);i&&o+v<=g&&""!==(f=p.substring(o,o+v));)(y=u[f])?i=!1:v++;d.push(parseInt(y,10)),o+=v}return d}(t,i(e)))}var u=function(){function t(){}return t.prototype.set=function(t,e){},t.prototype.get=function(t,e){},t.prototype.rm=function(t){},t}(),c=function(t){function r(){return null!==t&&t.apply(this,arguments)||this}return e(r,t),r.isSupport=function(){return!!window.localStorage},r.prototype.set=function(t,e){try{localStorage.setItem(t,e)}catch(t){console.error(t)}},r.prototype.get=function(t,e){var r=null;try{r=localStorage.getItem(t)}catch(t){console.error(t)}e&&e(r)},r.prototype.rm=function(t){try{localStorage.removeItem(t)}catch(t){console.error(t)}},r}(u),h=function(t){function r(){var e=t.call(this)||this;e.databaseName="spyLC",e.db=null,e.setQueue=[],e.getQueue=[];var r=window.indexedDB.open(e.databaseName);return r.onupgradeneeded=function(t){e.db=t.target&&t.target.result,e.db&&!e.db.objectStoreNames.contains(e.databaseName)&&e.db.createObjectStore(e.databaseName,{keyPath:"key"}),e.runQueueTask()},r.onsuccess=function(){e.db=r.result,e.runQueueTask()},e}return e(r,t),r.isSupport=function(){return!!window.indexedDB},r.prototype.set=function(t,e){this.db?this.db.transaction([this.databaseName],"readwrite").objectStore(this.databaseName).add({key:t,value:e}):this.setQueue.push({key:t,value:e})},r.prototype.get=function(t,e){if(this.db){var r=this.db.transaction([this.databaseName]).objectStore(this.databaseName).get(t);r.onsuccess=function(){var t=r.result?r.result:{value:""};e(t.value)}}else this.getQueue.push({key:t,cb:e})},r.prototype.runQueueTask=function(){var t=this;this.setQueue.forEach(function(e){t.set(e.key,e.value)}),this.getQueue.forEach(function(e){t.get(e.key,e.cb)})},r}(u);function l(t,e){if(void 0===e&&(e=!1),!t)return"";e||(t=function(t){for(var e="",r=0;r<t.length;r++){var o=t.charCodeAt(r);o<128?e+=String.fromCharCode(o):o>127&&o<2048?(e+=String.fromCharCode(o>>6|192),e+=String.fromCharCode(63&o|128)):(e+=String.fromCharCode(o>>12|224),e+=String.fromCharCode(o>>6&63|128),e+=String.fromCharCode(63&o|128))}return e}(t));var r,o,n,i={},a=[],s=t.charAt(0),u=s,c=u,h=256,l=function(){a.push(s.length>1?String.fromCharCode(i[s]):s)};for(e&&a.push(s),r=1;r<t.length;r++)o=t.charAt(r),e?(n=t.charCodeAt(r),s=n<256?o:i[n]||s+u,a.push(s),u=s.charAt(0),i[h++]=c+u,c=s):i.hasOwnProperty(s+o)?s+=o:(l(),i[s+o]=h++,s=o);e||l();var f=a.join("");return e&&(f=function(t){for(var e="",r=0,o=0,n=0,i=0;r<t.length;)(o=t.charCodeAt(r))<128?(e+=String.fromCharCode(o),r++):o>191&&o<224?(n=t.charCodeAt(r+1),e+=String.fromCharCode((31&o)<<6|63&n),r+=2):(n=t.charCodeAt(r+1),i=t.charCodeAt(r+2),e+=String.fromCharCode((15&o)<<12|(63&n)<<6|63&i),r+=3);return e}(f)),f}var f=function(){function t(t){void 0===t&&(t={}),this.tmpList=[],this.option=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var r=Object.assign||function(t){for(var e=void 0,r=1,o=arguments.length;r<o;r++)for(var n in e=arguments[r])Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t};return r.apply(null,t)}({defaultTrigger:!0,compress:"lzw",key:"SpyLocalCache",interval:500,maxRecordLen:30,onFlush:function(){},onSave:function(){},onAdd:function(){return!0},storage:h.isSupport()?"indexedDB":c.isSupport()?"localstorage":"empty"},t),this.load=this.load.bind(this),this.init()}return t.prototype.init=function(){"indexedDB"===this.option.storage?this.storage=new h:"localstorage"===this.option.storage?this.storage=new c:this.storage=new u,"complete"===document.readyState?this.load():window.addEventListener("load",this.load)},t.prototype.load=function(){location.search.indexOf("_FlushLogLocalCache=1")>-1&&this.option.defaultTrigger&&this.flushLog()},t.prototype.addLog=function(t){var e=this;this.option.onAdd&&!this.option.onAdd(t)||(t=JSON.stringify(t),this.tmpList.push(t),this.timer&&clearTimeout(this.timer),this.timer=setTimeout(function(){e.save()},this.option.interval))},t.prototype.getData=function(t){var e=this;try{this.storage.get(this.option.key,function(r){r?e.storage.get(e.option.key+"Codes",function(o){var n=[];try{o&&(o=JSON.parse(o)),n=e.unzip(r,o).split("\n")}catch(t){console.error(t)}t(n)}):t([])})}catch(e){console.error(e),t([])}},t.prototype.save=function(){var t=this,e=Date.now();this.getData(function(r){var o=t.option.maxRecordLen-1,n=(r.length>o?r.slice(r.length-o,r.length):r).concat(t.tmpList),i=n.join("\n"),a=null,s=0;try{var u=t.zip(i),c="";u.codes?(c=JSON.stringify(u.codes),t.storage.set(t.option.key+"Codes",c)):t.storage.rm(t.option.key+"Codes"),t.storage.set(t.option.key,u.result),s=u.result.length}catch(t){a=t,console.error(t)}t.tmpList=[],t.option.onSave&&t.option.onSave({cost:Date.now()-e,length:s/1024,list:n,error:a})})},t.prototype.flushLog=function(){var t=this;this.getData(function(e){try{for(var r=0;r<e.length;r++)e[r]=JSON.parse(e[r])}catch(r){e=[],t.storage.rm(t.option.key),console.error(r)}for(r=0;r<t.tmpList.length;r++)e.push(JSON.parse(t.tmpList[r]));t.option.onFlush&&t.option.onFlush(e)})},t.prototype.zip=function(t){return"lzw"===this.option.compress?{codes:null,result:l(t)}:"huffman"===this.option.compress?function(t){var e=o(i(t)),r=e.result;return{codes:e.codes,result:a(r)}}(t):{codes:null,result:t}},t.prototype.unzip=function(t,e){return"lzw"===this.option.compress?l(t,!0):"huffman"===this.option.compress?s(e,t):t},t}();return f});
|
package/package.json
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "spy-client",
|
|
3
|
-
"version": "2.1
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "spy client",
|
|
5
5
|
"main": "dist/spy-client.js",
|
|
6
6
|
"module": "dist/spy-client.esm.js",
|
|
7
7
|
"typings": "dist/spy-client.d.ts",
|
|
8
|
+
"packageManager": "pnpm@10.33.0",
|
|
9
|
+
"engines": {
|
|
10
|
+
"node": ">=24"
|
|
11
|
+
},
|
|
8
12
|
"scripts": {
|
|
9
|
-
"
|
|
10
|
-
"
|
|
11
|
-
"
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
"test": "karma start karma.conf.js",
|
|
18
|
-
"release_pre": "rm -fr dist && npm run build && npm run lint && npm run test",
|
|
19
|
-
"release": "npm version patch && npm publish --registry=https://registry.npmjs.org",
|
|
13
|
+
"dev": "rollup -c",
|
|
14
|
+
"watch": "NODE_OPTIONS='--max-old-space-size=4096' rollup -cw",
|
|
15
|
+
"build": "rm -fr dist && rollup -c && tsc -p tsconfig.json --declaration --emitDeclarationOnly --declarationDir dist",
|
|
16
|
+
"lint": "oxlint src",
|
|
17
|
+
"example": "pnpm run dev && echo 'open url http://localhost:8000/example' && python3 -m http.server 8000",
|
|
18
|
+
"test": "playwright test",
|
|
19
|
+
"release_pre": "pnpm run build && pnpm run lint && pnpm run test",
|
|
20
|
+
"release": "pnpm version patch && pnpm publish --registry=https://registry.npmjs.org",
|
|
20
21
|
"release_post": "git push origin master && git push origin --tags"
|
|
21
22
|
},
|
|
22
23
|
"directories": {
|
|
@@ -26,55 +27,6 @@
|
|
|
26
27
|
"dependencies": {
|
|
27
28
|
"core-js": "^3.6.4"
|
|
28
29
|
},
|
|
29
|
-
"devDependencies": {
|
|
30
|
-
"@babel/core": "^7.15.0",
|
|
31
|
-
"@babel/eslint-parser": "^7.15.0",
|
|
32
|
-
"@babel/eslint-plugin": "^7.14.5",
|
|
33
|
-
"@babel/preset-env": "^7.5.5",
|
|
34
|
-
"@ecomfe/eslint-config": "^7.2.1",
|
|
35
|
-
"@rollup/plugin-commonjs": "^11.0.2",
|
|
36
|
-
"@rollup/plugin-node-resolve": "^7.1.1",
|
|
37
|
-
"@rollup/plugin-typescript": "^8.2.5",
|
|
38
|
-
"@types/glob": "^7.1.1",
|
|
39
|
-
"@types/jasmine": "^3.5.10",
|
|
40
|
-
"@types/node": "^12.6.8",
|
|
41
|
-
"@types/uglifyjs-webpack-plugin": "^1.1.0",
|
|
42
|
-
"@types/webpack": "^4.4.35",
|
|
43
|
-
"@types/webpack-merge": "^4.1.5",
|
|
44
|
-
"@typescript-eslint/eslint-plugin": "^4.29.2",
|
|
45
|
-
"@typescript-eslint/parser": "^4.29.2",
|
|
46
|
-
"babel-eslint": "^10.1.0",
|
|
47
|
-
"babel-loader": "^8.0.6",
|
|
48
|
-
"cache-loader": "^4.1.0",
|
|
49
|
-
"css-loader": "^3.1.0",
|
|
50
|
-
"eslint": "^6.8.0",
|
|
51
|
-
"eslint-plugin-babel": "^5.3.0",
|
|
52
|
-
"eslint-plugin-import": "^2.24.1",
|
|
53
|
-
"fastify": "^3.21.0",
|
|
54
|
-
"fastify-cors": "^6.0.2",
|
|
55
|
-
"fecs": "^1.6.4",
|
|
56
|
-
"file-loader": "^4.1.0",
|
|
57
|
-
"jasmine-core": "^3.4.0",
|
|
58
|
-
"karma": "^6.3.4",
|
|
59
|
-
"karma-chrome-launcher": "^3.1.0",
|
|
60
|
-
"karma-jasmine": "^2.0.1",
|
|
61
|
-
"karma-jasmine-html-reporter": "^1.4.2",
|
|
62
|
-
"karma-typescript": "^5.5.2",
|
|
63
|
-
"less": "^3.9.0",
|
|
64
|
-
"less-loader": "^5.0.0",
|
|
65
|
-
"rollup": "^2.56.2",
|
|
66
|
-
"rollup-plugin-babel": "^4.4.0",
|
|
67
|
-
"rollup-plugin-replace": "^2.2.0",
|
|
68
|
-
"rollup-plugin-typescript2": "^0.30.0",
|
|
69
|
-
"rollup-plugin-uglify": "^6.0.4",
|
|
70
|
-
"stylus": "^0.54.5",
|
|
71
|
-
"stylus-loader": "^3.0.2",
|
|
72
|
-
"ts-loader": "^6.0.4",
|
|
73
|
-
"ts-node": "^8.3.0",
|
|
74
|
-
"typescript": "^4.3.5",
|
|
75
|
-
"uglifyjs-webpack-plugin": "^2.1.3",
|
|
76
|
-
"url-loader": "^2.1.0"
|
|
77
|
-
},
|
|
78
30
|
"keywords": [
|
|
79
31
|
"spy",
|
|
80
32
|
"client",
|
|
@@ -99,22 +51,23 @@
|
|
|
99
51
|
},
|
|
100
52
|
"author": "kaivean",
|
|
101
53
|
"license": "ISC",
|
|
102
|
-
"babel": {
|
|
103
|
-
"comments": false,
|
|
104
|
-
"presets": [],
|
|
105
|
-
"env": {
|
|
106
|
-
"test": {
|
|
107
|
-
"plugins": [
|
|
108
|
-
"istanbul"
|
|
109
|
-
]
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
},
|
|
113
54
|
"browserslist": [
|
|
114
55
|
"> 1%",
|
|
115
56
|
"last 2 versions",
|
|
116
57
|
"ie >= 9",
|
|
117
58
|
"android >= 4",
|
|
118
59
|
"ios >= 9"
|
|
119
|
-
]
|
|
60
|
+
],
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@playwright/test": "^1.63.0",
|
|
63
|
+
"@rollup/plugin-commonjs": "^29.0.3",
|
|
64
|
+
"@rollup/plugin-node-resolve": "^16.0.3",
|
|
65
|
+
"@rollup/plugin-terser": "^1.0.0",
|
|
66
|
+
"@rollup/plugin-typescript": "^12.3.0",
|
|
67
|
+
"@types/node": "^26.4.1",
|
|
68
|
+
"oxlint": "^1.81.0",
|
|
69
|
+
"rollup": "^4.63.1",
|
|
70
|
+
"tslib": "^2.8.1",
|
|
71
|
+
"typescript": "^6.0.3"
|
|
72
|
+
}
|
|
120
73
|
}
|
package/karma.conf.js
DELETED
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @file karma测试配置,放弃了karma-typescript,不支持相对导入,采用了webpack
|
|
3
|
-
* @author kaivean
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
// const webpack = require('webpack');
|
|
8
|
-
|
|
9
|
-
module.exports = config => {
|
|
10
|
-
config.set({
|
|
11
|
-
|
|
12
|
-
// base path that will be used to resolve all patterns (eg. files, exclude)
|
|
13
|
-
basePath: './',
|
|
14
|
-
|
|
15
|
-
// frameworks to use
|
|
16
|
-
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
|
|
17
|
-
frameworks: ['jasmine', 'karma-typescript'],
|
|
18
|
-
|
|
19
|
-
// plugins: ['karma-webpack'],
|
|
20
|
-
client: {
|
|
21
|
-
jasmine: {
|
|
22
|
-
random: false,
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
// list of files / patterns to load in the browser
|
|
27
|
-
files: [
|
|
28
|
-
'dist/spy-head.js', // 先加载
|
|
29
|
-
// 'dist/spy-client.js', // 先加载
|
|
30
|
-
// 'src/index.ts',
|
|
31
|
-
// 'test/**/basicSpec.ts',
|
|
32
|
-
// 'test/**/headSpec.ts',
|
|
33
|
-
// 'test/**/metricSpec.ts',
|
|
34
|
-
// 'test/**/*Spec.ts',
|
|
35
|
-
{
|
|
36
|
-
pattern: 'test/**/*Spec.ts',
|
|
37
|
-
watched: false, // 监听变化
|
|
38
|
-
included: true, // script加载到页面里
|
|
39
|
-
served: true, // be served by Karma's webserver
|
|
40
|
-
nocache: false, // 为了保证测试到一些case,比如lcp等
|
|
41
|
-
},
|
|
42
|
-
],
|
|
43
|
-
|
|
44
|
-
// list of files / patterns to exclude
|
|
45
|
-
exclude: [
|
|
46
|
-
|
|
47
|
-
],
|
|
48
|
-
|
|
49
|
-
// preprocess matching files before serving them to the browser
|
|
50
|
-
// available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
|
|
51
|
-
preprocessors: {
|
|
52
|
-
'test/**/*.ts': ['karma-typescript'],
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
karmaTypescriptConfig: {
|
|
56
|
-
exclude: ['node_modules'],
|
|
57
|
-
include: ['test/**/*.ts'],
|
|
58
|
-
compilerOptions: {
|
|
59
|
-
baseUrl: '.',
|
|
60
|
-
paths: {
|
|
61
|
-
'spy-client': ['dist/spy-client.js'],
|
|
62
|
-
},
|
|
63
|
-
},
|
|
64
|
-
transformPath(filepath) {
|
|
65
|
-
return filepath.replace(/\.(ts|tsx)$/, '.js');
|
|
66
|
-
},
|
|
67
|
-
// tsconfig: './tsconfig.json',
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
reporters: ['progress', 'kjhtml', 'karma-typescript'],
|
|
71
|
-
|
|
72
|
-
// web server port
|
|
73
|
-
port: 9876,
|
|
74
|
-
|
|
75
|
-
// enable / disable colors in the output (reporters and logs)
|
|
76
|
-
colors: true,
|
|
77
|
-
|
|
78
|
-
// level of logging
|
|
79
|
-
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
|
|
80
|
-
logLevel: config.LOG_INFO,
|
|
81
|
-
|
|
82
|
-
// enable / disable watching file and executing tests whenever any file changes
|
|
83
|
-
autoWatch: true,
|
|
84
|
-
|
|
85
|
-
// start these browsers
|
|
86
|
-
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
|
|
87
|
-
browsers: ['Chrome'],
|
|
88
|
-
|
|
89
|
-
// you can define custom flags
|
|
90
|
-
customLaunchers: {
|
|
91
|
-
ChromeHeadlessNoSandbox: {
|
|
92
|
-
base: 'ChromeHeadless',
|
|
93
|
-
flags: ['--no-sandbox'],
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
|
|
97
|
-
// Continuous Integration mode
|
|
98
|
-
// if true, Karma captures browsers, runs the tests and exits
|
|
99
|
-
singleRun: true,
|
|
100
|
-
|
|
101
|
-
// Concurrency level
|
|
102
|
-
// how many browser should be started simultaneous
|
|
103
|
-
concurrency: Infinity,
|
|
104
|
-
});
|
|
105
|
-
|
|
106
|
-
if (process.env.TRAVIS) {
|
|
107
|
-
config.set({
|
|
108
|
-
browsers: ['ChromeHeadless', 'ChromeHeadlessNoSandbox'],
|
|
109
|
-
});
|
|
110
|
-
}
|
|
111
|
-
};
|