Skip to content

Commit

Permalink
migrate from jest to karma+mocha+expect from jest
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexey Smirnov committed Jan 29, 2019
1 parent cc3b808 commit eadf4e1
Show file tree
Hide file tree
Showing 17 changed files with 8,691 additions and 4,356 deletions.
2 changes: 1 addition & 1 deletion config/paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const pythiaCryptoBrowserPath = path.resolve(noPythiaCryptoPath, '../virgil-cryp

class Paths {
constructor() {
this.PLATFORM = process.env.PLATFORM || 'node';
this.PLATFORM = process.env.PLATFORM || 'browser';
this.IS_BROWSER = this.PLATFORM === 'browser';
this.NAME = 'e3kit';

Expand Down
11 changes: 9 additions & 2 deletions config/rollup-plugins.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,22 @@ class RollupPluginsResolver {

constructor() {
this.commonjs = commonjs;
this.nodeGlobals = nodeGlobals;
this.nodeGlobals = nodeGlobals();
this.resolve = resolve;
this.sourcemap = sourcemap;
this.uglify = uglify;
this.resolveVirgilCrypto = resolveVirgilCrypto;
this.typescriptResolved = typescript({
exclude: ['**/*.test.ts', '**/*.spec.ts', '**/__mocks__/*.ts'],
exclude: ['**/*.spec.ts', '**/__mocks__/*.ts'],
useTsconfigDeclarationDir: true,
});
this.inject = inject({
include: '**/*.ts',
exclude: 'node_modules/**',
modules: {
Buffer: [ 'buffer-es6', 'Buffer' ]
}
})
}
}

Expand Down
2 changes: 2 additions & 0 deletions config/rollup.config.es.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@ module.exports = {
plugins.resolve({ browser: true }),
plugins.commonjs(),
plugins.typescriptResolved,
plugins.nodeGlobals,
plugins.inject,
],
};
4 changes: 3 additions & 1 deletion config/rollup.config.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ module.exports = {
plugins.resolve({ browser: true }),
plugins.commonjs(),
plugins.typescriptResolved,
plugins.uglify(),
plugins.nodeGlobals,
plugins.inject,
process.env.NODE_ENV === 'production' && plugins.uglify(),
],
};
Loading

0 comments on commit eadf4e1

Please sign in to comment.