import popper.js
Signed-off-by: Nico Schottelius <nico@nico-notebook.schottelius.org>
This commit is contained in:
parent
615dc56d16
commit
16fb2bb919
241 changed files with 34099 additions and 0 deletions
16
assets/u/static/popper.js-1.16.0/packages/test/.babelrc.js
Normal file
16
assets/u/static/popper.js-1.16.0/packages/test/.babelrc.js
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
module.exports = {
|
||||
presets: [require.resolve('babel-preset-stage-2')],
|
||||
plugins: [require.resolve('babel-plugin-external-helpers')],
|
||||
env: {
|
||||
coverage: {
|
||||
plugins: [
|
||||
[
|
||||
require.resolve('babel-plugin-istanbul'),
|
||||
{
|
||||
exclude: ['tests/**'],
|
||||
},
|
||||
],
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
6
assets/u/static/popper.js-1.16.0/packages/test/README.md
Normal file
6
assets/u/static/popper.js-1.16.0/packages/test/README.md
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
# Popper.js scripts
|
||||
|
||||
This package is a list of scripts used by Popper.js and Tooltip.js to
|
||||
test the packages.
|
||||
|
||||
It's not intended to be used outside of Popper.js repository.
|
||||
14
assets/u/static/popper.js-1.16.0/packages/test/bin/karma.js
Executable file
14
assets/u/static/popper.js-1.16.0/packages/test/bin/karma.js
Executable file
|
|
@ -0,0 +1,14 @@
|
|||
#!/usr/bin/env node
|
||||
const path = require('path');
|
||||
const { Server, config } = require('karma');
|
||||
|
||||
const karmaConfig = config.parseConfig(
|
||||
path.resolve(__dirname, '../karma.conf.js')
|
||||
);
|
||||
|
||||
const server = new Server(karmaConfig, exitCode => {
|
||||
console.log('Karma has exited with ' + exitCode);
|
||||
process.exit(exitCode);
|
||||
});
|
||||
|
||||
server.start();
|
||||
174
assets/u/static/popper.js-1.16.0/packages/test/karma.conf.js
Normal file
174
assets/u/static/popper.js-1.16.0/packages/test/karma.conf.js
Normal file
|
|
@ -0,0 +1,174 @@
|
|||
const { argv } = require('yargs');
|
||||
const path = require('path');
|
||||
const babel = require('rollup-plugin-babel');
|
||||
const resolve = require('rollup-plugin-node-resolve');
|
||||
|
||||
const browsers = (argv.browsers ||
|
||||
process.env.BROWSERS ||
|
||||
'ChromeHeadless'
|
||||
).split(',');
|
||||
const singleRun = process.env.NODE_ENV === 'development' ? false : true;
|
||||
const coverage = process.env.COVERAGE === 'true';
|
||||
const basePath = process.cwd();
|
||||
|
||||
const babelrc = {
|
||||
babelrc: false,
|
||||
presets: [
|
||||
[require.resolve('babel-preset-env'), { modules: false }],
|
||||
require.resolve('babel-preset-stage-2'),
|
||||
],
|
||||
plugins: [
|
||||
require.resolve('babel-plugin-external-helpers'),
|
||||
[
|
||||
require.resolve('babel-plugin-module-resolver'),
|
||||
{
|
||||
alias: {
|
||||
src: './src',
|
||||
'popper.js': '../popper/src/index.js',
|
||||
},
|
||||
},
|
||||
],
|
||||
],
|
||||
};
|
||||
|
||||
if (coverage) {
|
||||
babelrc.plugins.unshift(require.resolve('babel-plugin-istanbul'));
|
||||
}
|
||||
|
||||
module.exports = function(config) {
|
||||
const configuration = {
|
||||
basePath,
|
||||
frameworks: ['jasmine', 'chai', 'sinon'],
|
||||
singleRun,
|
||||
browserNoActivityTimeout: 60000,
|
||||
browserDisconnectTolerance: 10,
|
||||
browsers: browsers,
|
||||
autoWatch: true,
|
||||
concurrency: 2,
|
||||
browserConsoleLogOptions: {
|
||||
level: 'log',
|
||||
format: '%b %T: %m',
|
||||
terminal: true,
|
||||
},
|
||||
customLaunchers: {
|
||||
ChromeHeadless: {
|
||||
base: 'Chrome',
|
||||
flags: [
|
||||
'--no-sandbox',
|
||||
// See https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md
|
||||
'--headless',
|
||||
'--disable-gpu',
|
||||
// Without a remote debugging port, Google Chrome exits immediately.
|
||||
' --remote-debugging-port=9222',
|
||||
],
|
||||
},
|
||||
ChromeDebug: {
|
||||
base: 'Chrome',
|
||||
chromeDataDir: path.resolve(__dirname, '.chrome'),
|
||||
},
|
||||
SLChrome: {
|
||||
base: 'SauceLabs',
|
||||
browserName: 'chrome',
|
||||
platform: 'macOS 10.12',
|
||||
},
|
||||
SLFirefox: {
|
||||
base: 'SauceLabs',
|
||||
browserName: 'firefox',
|
||||
platform: 'macOS 10.12',
|
||||
},
|
||||
SLEdge: {
|
||||
base: 'SauceLabs',
|
||||
browserName: 'microsoftedge',
|
||||
},
|
||||
SLSafari: {
|
||||
base: 'SauceLabs',
|
||||
browserName: 'safari',
|
||||
platform: 'macOS 10.12',
|
||||
},
|
||||
SLInternetExplorer10: {
|
||||
base: 'SauceLabs',
|
||||
browserName: 'internet explorer',
|
||||
version: '10',
|
||||
platform: 'Windows 8',
|
||||
},
|
||||
SLInternetExplorer11: {
|
||||
base: 'SauceLabs',
|
||||
browserName: 'internet explorer',
|
||||
version: '11',
|
||||
platform: 'Windows 10',
|
||||
},
|
||||
// Currently not used because the iOS emulator isn't reliable and
|
||||
// most of the times it times out
|
||||
SLiOS11: {
|
||||
base: 'SauceLabs',
|
||||
browserName: 'Safari',
|
||||
deviceName: 'iPhone 8 Plus Simulator',
|
||||
deviceOrientation: 'portrait',
|
||||
platformVersion: '11.0',
|
||||
platformName: 'iOS',
|
||||
appiumVersion: '1.7.1',
|
||||
},
|
||||
SLChromeMobile: {
|
||||
base: 'SauceLabs',
|
||||
browserName: 'Chrome',
|
||||
appiumVersion: '1.6.3',
|
||||
platformVersion: '7.0',
|
||||
platformName: 'Android',
|
||||
deviceName: 'Android GoogleAPI Emulator',
|
||||
},
|
||||
},
|
||||
preprocessors: {
|
||||
['./node_modules/test-utils/setup.js']: ['rollup'],
|
||||
['./node_modules/test-utils/utils/*.js']: ['rollup'],
|
||||
['./tests/**/*.js']: ['rollup'],
|
||||
},
|
||||
|
||||
rollupPreprocessor: {
|
||||
format: 'umd',
|
||||
sourcemap: 'inline',
|
||||
globals: {
|
||||
chai: 'chai',
|
||||
'popper-utils': 'PopperUtils',
|
||||
},
|
||||
external: ['chai', 'popper-utils'],
|
||||
plugins: [resolve(), babel(babelrc)],
|
||||
},
|
||||
files: [
|
||||
'./tests/styles/*.css',
|
||||
'./tests/functional/*.js',
|
||||
'./tests/unit/*.js',
|
||||
],
|
||||
sauceLabs: {
|
||||
testName: 'Popper.js',
|
||||
startConnect: false,
|
||||
recordVideo: true,
|
||||
tunnelIdentifier: process.env.TRAVIS_JOB_NUMBER,
|
||||
},
|
||||
reporters: ['mocha', 'saucelabs'],
|
||||
plugins: [
|
||||
require('karma-chai'),
|
||||
require('karma-chrome-launcher'),
|
||||
require('karma-coverage'),
|
||||
require('karma-firefox-launcher'),
|
||||
require('karma-jasmine'),
|
||||
require('karma-mocha-reporter'),
|
||||
require('karma-rollup-preprocessor'),
|
||||
require('karma-safari-launcher'),
|
||||
require('karma-sauce-launcher'),
|
||||
require('karma-sinon'),
|
||||
],
|
||||
};
|
||||
|
||||
if (coverage) {
|
||||
configuration.coverageReporter = {
|
||||
dir: './.tmp/coverage',
|
||||
reporters: [
|
||||
{ type: 'html', subdir: 'report-html' },
|
||||
{ type: 'lcov', subdir: 'report-lcov' },
|
||||
],
|
||||
};
|
||||
configuration.reporters.push('coverage');
|
||||
}
|
||||
|
||||
config.set(configuration);
|
||||
};
|
||||
43
assets/u/static/popper.js-1.16.0/packages/test/package.json
Normal file
43
assets/u/static/popper.js-1.16.0/packages/test/package.json
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
"name": "@popperjs/test",
|
||||
"version": "1.0.2",
|
||||
"description": "This package is a list of scripts used by Popper.js and Tooltip.js to test them.",
|
||||
"bin": {
|
||||
"popper-karma": "./bin/karma.js"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "exit 0"
|
||||
},
|
||||
"author": "Federico Zivolo <federico.zivolo@gmail.com>",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"babel-core": "^6.24.1",
|
||||
"babel-eslint": "^7.2.3",
|
||||
"babel-plugin-external-helpers": "^6.22.0",
|
||||
"babel-plugin-istanbul": "^4.1.4",
|
||||
"babel-plugin-module-resolver": "^2.7.1",
|
||||
"babel-preset-minify": "^0.2.0",
|
||||
"babel-preset-stage-2": "^6.24.1",
|
||||
"chai": "^4.0.1",
|
||||
"eslint": "^4.0.0",
|
||||
"eslint-plugin-jasmine": "^2.6.2",
|
||||
"jasmine-core": "^2.6.2",
|
||||
"karma": "^1.7.0",
|
||||
"karma-chai": "^0.1.0",
|
||||
"karma-chrome-launcher": "^2.1.1",
|
||||
"karma-coverage": "^1.1.1",
|
||||
"karma-firefox-launcher": "^1.0.1",
|
||||
"karma-jasmine": "^1.1.0",
|
||||
"karma-mocha-reporter": "^2.2.3",
|
||||
"karma-rollup-preprocessor": "^5.0.0",
|
||||
"karma-safari-launcher": "^1.0.0",
|
||||
"karma-sauce-launcher": "^1.1.0",
|
||||
"karma-sinon": "^1.0.5",
|
||||
"rollup": "^0.50.0",
|
||||
"rollup-plugin-babel": "^2.7.1",
|
||||
"rollup-plugin-node-resolve": "^3.0.0",
|
||||
"rollup-watch": "^4.0.0",
|
||||
"sinon": "^2.3.2",
|
||||
"yargs": "^8.0.1"
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue