mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
As used in the open-wc project - type definitions - tests https://github.com/localvoid/karma-snapshot Thanks!
28 lines
821 B
TypeScript
28 lines
821 B
TypeScript
// karma.conf.js
|
|
import karma = require('karma');
|
|
import path = require('path');
|
|
|
|
const resolver: karma.SnapshotPathResolver = (basePath, suiteName) => {
|
|
return path.join(basePath, '__snapshots__', suiteName + '.md');
|
|
};
|
|
|
|
module.exports = (config: karma.Config) => {
|
|
config.set({
|
|
browsers: ['ChromeHeadless'],
|
|
frameworks: ['mocha', 'snapshot', 'mocha-snapshot'],
|
|
reporters: ['mocha'],
|
|
preprocessors: {
|
|
'**/__snapshots__/**/*.md': ['snapshot'],
|
|
},
|
|
files: ['**/__snapshots__/**/*.md', '__tests__/index.js'],
|
|
snapshot: {
|
|
update: true,
|
|
prune: false,
|
|
format: 'indented-md',
|
|
checkSourceFile: true,
|
|
pathResolver: resolver,
|
|
limitUnusedSnapshotsInWarning: -1,
|
|
},
|
|
});
|
|
};
|