mirror of
https://github.com/Xahau/xahau.js.git
synced 2025-11-12 16:45:49 +00:00
fix: speed up webpacking
This commit is contained in:
8
test/integration/index.ts
Normal file
8
test/integration/index.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
/* eslint-disable import/export -- Tells webpack which files exist. */
|
||||
export * from './integration'
|
||||
export * from './transactions/signerListSet'
|
||||
export * from './transactions/payment'
|
||||
export * from './transactions/offerCreate'
|
||||
export * from './transactions/offerCancel'
|
||||
export * from './transactions/signerListSet'
|
||||
export * from './requests/utility'
|
||||
@@ -17,12 +17,7 @@
|
||||
mocha.ui('bdd')
|
||||
</script>
|
||||
|
||||
<script src="../testCompiledForWeb/offerCancel.js"></script>
|
||||
<script src="../testCompiledForWeb/offerCreate.js"></script>
|
||||
<script src="../testCompiledForWeb/payment.js"></script>
|
||||
<script src="../testCompiledForWeb/signerListSet.js"></script>
|
||||
<script src="../testCompiledForWeb/utility.js"></script>
|
||||
<script src="../testCompiledForWeb/integration.js"></script>
|
||||
<script src="../testCompiledForWeb/index.js"></script>
|
||||
|
||||
<script>
|
||||
mocha.run()
|
||||
|
||||
@@ -120,30 +120,9 @@ function webpackForTest(testFileName) {
|
||||
},
|
||||
},
|
||||
}
|
||||
// return Object.assign({}, getDefaultConfiguration(), test)
|
||||
return test
|
||||
}
|
||||
|
||||
function webpackIntegrationTests() {
|
||||
const dir = './test/integration/'
|
||||
const tests = []
|
||||
const dirPaths = fs.readdirSync(dir)
|
||||
tests.push(webpackForTest(`./${path.join(dir, 'integration.ts')}`))
|
||||
const subdirs = dirPaths.filter(
|
||||
(filename) =>
|
||||
!filename.match(/\/?([^\/]*)\.ts$/) && filename !== 'README.md',
|
||||
)
|
||||
subdirs.forEach((subdir) => {
|
||||
const subdirPaths = fs.readdirSync(path.join(dir, subdir))
|
||||
subdirPaths.forEach((filename) => {
|
||||
tests.push(webpackForTest(`./${path.join(dir, subdir, filename)}`))
|
||||
})
|
||||
})
|
||||
return tests.map(
|
||||
(test) => (env, argv) => Object.assign({}, getDefaultConfiguration(), test),
|
||||
)
|
||||
}
|
||||
|
||||
module.exports = [
|
||||
(env, argv) => {
|
||||
const config = getDefaultConfiguration()
|
||||
@@ -160,5 +139,5 @@ module.exports = [
|
||||
}
|
||||
return config
|
||||
},
|
||||
...webpackIntegrationTests(),
|
||||
(env, argv) => webpackForTest('./test/integration/index.ts'),
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user