test: add browser test for Parse URI
- Add a browser UI test in 02_ops.js to test constructor and __proto__ query parameters in the npm url polyfill context. - Fix webpack.config.js exclude rule and asset/inline overlap to enable dev builds on Windows.
This commit is contained in:
parent
c54a26eec5
commit
b65c8eaebc
@ -277,7 +277,7 @@ module.exports = {
|
|||||||
// testOp(browser, "Parse TLV", "test input", "test_output");
|
// testOp(browser, "Parse TLV", "test input", "test_output");
|
||||||
testOpHtml(browser, "Parse UDP", "04 89 00 35 00 2c 01 01", "tr:last-child td:last-child", "0x0101");
|
testOpHtml(browser, "Parse UDP", "04 89 00 35 00 2c 01 01", "tr:last-child td:last-child", "0x0101");
|
||||||
// testOp(browser, "Parse UNIX file permissions", "test input", "test_output");
|
// testOp(browser, "Parse UNIX file permissions", "test input", "test_output");
|
||||||
// testOp(browser, "Parse URI", "test input", "test_output");
|
testOp(browser, "Parse URI", "https://example.com/?constructor=ok&__proto__=hello", /Arguments:\s+constructor = ok\s+__proto__\s+= hello/);
|
||||||
testOp(browser, "Parse User Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0 ", /Architecture: amd64/);
|
testOp(browser, "Parse User Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:47.0) Gecko/20100101 Firefox/47.0 ", /Architecture: amd64/);
|
||||||
// testOp(browser, "Parse X.509 certificate", "test input", "test_output");
|
// testOp(browser, "Parse X.509 certificate", "test input", "test_output");
|
||||||
testOpFile(browser, "Play Media", "files/mp3example.mp3", "audio", "");
|
testOpFile(browser, "Play Media", "files/mp3example.mp3", "audio", "");
|
||||||
|
|||||||
@ -142,7 +142,7 @@ module.exports = {
|
|||||||
rules: [
|
rules: [
|
||||||
{
|
{
|
||||||
test: /\.m?js$/,
|
test: /\.m?js$/,
|
||||||
exclude: /node_modules\/(?!crypto-api|bootstrap)/,
|
exclude: /node_modules[\\/](?!crypto-api|bootstrap)/,
|
||||||
options: {
|
options: {
|
||||||
configFile: path.resolve(__dirname, "babel.config.js"),
|
configFile: path.resolve(__dirname, "babel.config.js"),
|
||||||
cacheDirectory: true,
|
cacheDirectory: true,
|
||||||
@ -211,18 +211,20 @@ module.exports = {
|
|||||||
filename: "assets/fonts/[name][ext]"
|
filename: "assets/fonts/[name][ext]"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{ // First party images are saved as files to be cached
|
{
|
||||||
test: /\.(png|jpg|gif)$/,
|
test: /\.(png|jpg|gif)$/,
|
||||||
exclude: /(node_modules|bmfonts)/,
|
oneOf: [
|
||||||
type: "asset/resource",
|
{
|
||||||
generator: {
|
exclude: /(node_modules|bmfonts)/,
|
||||||
filename: "images/[name][ext]"
|
type: "asset/resource",
|
||||||
}
|
generator: {
|
||||||
},
|
filename: "images/[name][ext]"
|
||||||
{ // Third party images are inlined
|
}
|
||||||
test: /\.(png|jpg|gif)$/,
|
},
|
||||||
exclude: /web\/static/,
|
{
|
||||||
type: "asset/inline",
|
type: "asset/inline"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user