Bring smoketest scripts together (#3370)

This commit is contained in:
Alexandru Dima 2022-10-18 14:20:09 +02:00 committed by GitHub
parent 5d653b2569
commit 2b3d8516c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 1546 additions and 112 deletions

View file

@ -5,8 +5,6 @@
"main": "out/index.js",
"typings": "./out/index.d.ts",
"scripts": {
"package-for-smoketest": "node ./node_modules/webpack/bin/webpack.js --config smoketest/webpack.config.js --progress",
"smoketest-cross-origin": "node ./node_modules/webpack/bin/webpack.js --config smoketest/webpack-cross-origin.config.js --progress",
"watch": "tsc -w -p tsconfig.json",
"compile": "tsc -p tsconfig.json",
"import-editor": "node ./scripts/import-editor.js",

View file

@ -1,4 +0,0 @@
import * as monaco from 'monaco-editor/esm/vs/editor/editor.api';
// expose the monaco API as a global for tests
window.monacoAPI = monaco;

View file

@ -1,39 +0,0 @@
const MonacoWebpackPlugin = require('../out/index.js');
const path = require('path');
const ASSET_PATH = 'http://localhost:8088/monaco-editor/test/smoke/webpack/out/';
const REPO_ROOT = path.join(__dirname, '../../');
module.exports = {
mode: 'development',
entry: './index.js',
context: __dirname,
output: {
path: path.resolve(REPO_ROOT, 'test/smoke/webpack/out'),
filename: 'app.js',
publicPath: ASSET_PATH
},
resolve: {
alias: {
'monaco-editor': path.resolve(REPO_ROOT, 'release')
}
},
module: {
rules: [
{
test: /\.css$/,
use: ['style-loader', 'css-loader']
},
{
test: /\.ttf$/,
use: ['file-loader']
}
]
},
plugins: [
new MonacoWebpackPlugin({
monacoEditorPath: path.resolve(REPO_ROOT, 'release')
})
]
};

View file

@ -1,36 +0,0 @@
const MonacoWebpackPlugin = require('../out/index.js');
const path = require('path');
const REPO_ROOT = path.join(__dirname, '../../');
module.exports = {
mode: 'development',
entry: './index.js',
context: __dirname,
output: {
path: path.resolve(REPO_ROOT, 'test/smoke/webpack/out'),
filename: 'app.js'
},
resolve: {
alias: {
'monaco-editor': path.resolve(REPO_ROOT, 'release')
}
},
module: {
rules: [
{
test: /\.css$/,
use: ['style-loader', 'css-loader']
},
{
test: /\.ttf$/,
use: ['file-loader']
}
]
},
plugins: [
new MonacoWebpackPlugin({
monacoEditorPath: path.resolve(REPO_ROOT, 'release')
})
]
};