1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/mirrors-pxt

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
karma.conf.js 2.8 КБ
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
Richard Knoll Отправлено 06.01.2025 22:25 66ccef8
const puppeteer = require('puppeteer');
process.env.CHROME_BIN = puppeteer.executablePath()
console.log(`chromium: `, process.env.CHROME_BIN)
// Karma configuration
module.exports = function(config) {
config.set({
// base path that will be used to resolve all patterns (eg. files, exclude)
basePath: '',
// frameworks to use
// available frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: ['mocha', 'chai'],
// list of files / patterns to load in the browser
files: [
'built/web/jquery.js',
'built/web/typescript.js',
'webapp/public/blockly/**/*.js',
'built/pxtlib.js',
'built/pxtcompiler.js',
'built/tests/karma-test-runner.js',
// test assets
{ pattern: 'tests/blocklycompiler-test/cases/*.blocks', watched: false, included: false, served: true, nocache: false },
{ pattern: 'tests/blocklycompiler-test/baselines/*.ts', watched: false, included: false, served: true, nocache: false },
{ pattern: 'tests/blocklycompiler-test/test-library/*', watched: false, included: false, served: true, nocache: false },
// test package files
{ pattern: 'libs/pxt-common/*.ts', watched: false, included: false, served: true, nocache: false },
// Needed by webworker
{ pattern: 'built/web/*.js', watched: false, included: false, served: true, nocache: false },
],
proxies: {
"/tests/": "/base/tests/blocklycompiler-test/cases/",
"/baselines/" : "/base/tests/blocklycompiler-test/baselines/",
"/test-library/": "/base/tests/blocklycompiler-test/test-library/",
"/common/": "/base/libs/pxt-common/",
// Needed by webworker
"/blb/": "/base/built/web/"
},
// list of files to exclude
exclude: [
],
// preprocess matching files before serving them to the browser
preprocessors: {
},
// test results reporter to use
// possible values: 'dots', 'progress'
reporters: ['progress'],
// web server port
port: 9876,
colors: true,
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
logLevel: config.LOG_INFO,
// We don't use the watcher but for some reason this must be set to true for tests to run
autoWatch: true,
browsers: [process.env.GITHUB_ACTIONS ? 'chromium_githubactions' : 'ChromeHeadless'],
// Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits
singleRun: true,
// Concurrency level
// how many browser should be started simultaneous
concurrency: Infinity,
// Launcher for using chromium in Travis
customLaunchers: {
chromium_githubactions: {
base: "ChromeHeadless",
flags: ['--no-sandbox']
}
}
})
}

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/mirrors-pxt.git
git@api.gitlife.ru:oschina-mirror/mirrors-pxt.git
oschina-mirror
mirrors-pxt
mirrors-pxt
master