-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ResizeObserver instances are no longer created unnecessarily
When the onResize callback changes. (Fixes #32) Using webpack through karma to build tests instead of using parcel separately.
- Loading branch information
Showing
10 changed files
with
345 additions
and
110 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,32 @@ | ||
[ | ||
{ | ||
"path": "dist/bundle.esm.js", | ||
"limit": "323 B", | ||
"limit": "353 B", | ||
"gzip": true | ||
}, | ||
{ | ||
"path": "dist/bundle.esm.js", | ||
"limit": "243 B", | ||
"limit": "266 B", | ||
"brotli": true | ||
}, | ||
{ | ||
"path": "dist/bundle.cjs.js", | ||
"limit": "313 B", | ||
"limit": "341 B", | ||
"gzip": true | ||
}, | ||
{ | ||
"path": "dist/bundle.cjs.js", | ||
"limit": "233 B", | ||
"limit": "258 B", | ||
"brotli": true | ||
}, | ||
{ | ||
"path": "polyfilled.js", | ||
"limit": "2644 B", | ||
"limit": "2673 B", | ||
"gzip": true | ||
}, | ||
{ | ||
"path": "polyfilled.js", | ||
"limit": "2353 B", | ||
"limit": "2381 B", | ||
"brotli": true | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,60 @@ | ||
module.exports = function(config) { | ||
module.exports = function (config) { | ||
const browsers = (process.env.KARMA_BROWSERS || "ChromeHeadless").split(","); | ||
|
||
const testFilePattern = "tests/*.tsx"; | ||
|
||
config.set({ | ||
basePath: ".", | ||
frameworks: ["jasmine"], | ||
files: ["tests/dist/index.js"], | ||
files: [ | ||
{ | ||
pattern: testFilePattern, | ||
watched: true, | ||
}, | ||
], | ||
autoWatch: true, | ||
|
||
browsers, | ||
reporters: ["spec"], | ||
preprocessors: { | ||
[testFilePattern]: ["webpack", "sourcemap"], | ||
}, | ||
|
||
// Max concurrency for SauceLabs OS plan | ||
concurrency: 5, | ||
|
||
client: { | ||
jasmine: { | ||
// Order of the tests matter, so don't randomise it | ||
random: false | ||
} | ||
} | ||
random: false, | ||
}, | ||
}, | ||
|
||
webpack: { | ||
mode: "development", | ||
devtool: "inline-source-map", | ||
module: { | ||
rules: [ | ||
{ | ||
test: /\.(ts|tsx|js|jsx)$/, | ||
exclude: /node_modules/, | ||
use: { | ||
loader: "babel-loader", | ||
options: { | ||
presets: [ | ||
["@babel/preset-env", { loose: true, modules: false }], | ||
"@babel/preset-react", | ||
"@babel/preset-typescript", | ||
], | ||
plugins: [["@babel/transform-runtime", { useESModules: true }]], | ||
}, | ||
}, | ||
}, | ||
], | ||
}, | ||
resolve: { | ||
extensions: [".ts", ".tsx", ".js", ".jsx"], | ||
}, | ||
}, | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.