Skip to content

Commit 0e8fa7a

Browse files
author
Mark Kennedy
authored
Add location hash detection (#26)
* Support location hashes * install query-selector-shadow-dom * Scroll anchor element into view that matches hash * Pass hash on initial load * Use open-wc in test suite * Use @open-wc/testing for fixtures and assertions * Upgrade all tests * 0.9.0-alpha.0
1 parent 98d1ba7 commit 0e8fa7a

File tree

7 files changed

+3054
-373
lines changed

7 files changed

+3054
-373
lines changed

.babelrc.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
module.exports = {
2+
presets: [
3+
'@babel/preset-typescript',
4+
[
5+
'@babel/preset-env',
6+
{
7+
useBuiltIns: 'usage',
8+
corejs: 3,
9+
targets: {
10+
browsers: ['last 2 versions', 'ie >= 11']
11+
}
12+
}
13+
]
14+
]
15+
};

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ node_modules
55
coverage
66
.rpt2_cache
77
dist
8+
.coverage

karma.conf.js

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
module.exports = function(config) {
22
config.set({
3-
files: ['tests/**/*.ts', 'src/**/*.ts'],
4-
preprocessors: {
5-
'**/*.ts': ['karma-typescript'],
3+
files: [{ pattern: 'tests/**/*.ts', type: 'module' }],
4+
5+
plugins: [require.resolve('@open-wc/karma-esm'), 'karma-mocha', 'karma-chrome-launcher', 'karma-coverage'],
6+
esm: {
7+
nodeResolve: true,
8+
compatibility: 'all',
9+
fileExtensions: ['.ts'],
10+
babel: true
611
},
7-
karmaTypescriptConfig: {
8-
compilerOptions: {
9-
module: "commonjs",
10-
sourceMap: true,
11-
target: "es6"
12-
},
13-
exclude: ["node_modules"]
12+
coverageReporter: {
13+
includeAllSources: true,
14+
dir: '.coverage',
15+
reporters: [{ type: 'lcov', subdir: '.' }, { type: 'text-summary' }]
1416
},
15-
reporters: ['progress', 'karma-typescript'],
16-
frameworks: ['mocha', 'karma-typescript'],
17+
reporters: ['progress', 'coverage'],
18+
frameworks: ['esm', 'mocha'],
1719
port: 9876,
1820
colors: true,
1921
logLevel: config.LOG_INFO,

0 commit comments

Comments
 (0)