feat: improve component based tests approach (#5923)

- new mode that mounts the spec iframe instead of application iframe
This commit is contained in:
Dmitriy Kovalenko
2020-04-26 23:25:24 +03:00
committed by GitHub
parent 79379a96d2
commit 379a9e7008
52 changed files with 1587 additions and 506 deletions
+14 -1
View File
@@ -15,6 +15,7 @@ const { expect } = chai
const packages = require('../../../binary/util/packages')
const { transformRequires } = require('../../../binary/util/transform-requires')
const { testPackageStaticAssets } = require('../../../binary/util/testStaticAssets')
const externalUtils = require('../../../binary/util/3rd-party')
global.beforeEach(() => {
mockfs.restore()
@@ -40,7 +41,19 @@ describe('packages', () => {
},
})
await packages.copyAllToDist(os.tmpdir())
sinon.stub(externalUtils, 'globby')
.withArgs(['package.json', 'lib', 'src/main.js'])
.resolves([
'package.json',
'lib/foo.js',
'src/main.js',
])
const destinationFolder = os.tmpdir()
debug('destination folder %s', destinationFolder)
await packages.copyAllToDist(destinationFolder)
const files = getFs()