-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Failing test case for rollup circular dependencies.
- Loading branch information
1 parent
372bca9
commit 317bea8
Showing
4 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { QueryManager } from '../../lib/src/core/QueryManager.js'; | ||
import { ObservableQuery } from '../../lib/src/core/ObservableQuery.js'; | ||
|
||
if (!QueryManager && !ObservableQuery) | ||
throw new Error('Circular dependency detected!'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// import { assert } from 'chai'; | ||
import { join } from 'path'; | ||
|
||
/* tslint:disable */ | ||
declare function require(name: string): any; | ||
const rollup: any = require('rollup'); | ||
const resolve: any = require('rollup-plugin-node-resolve'); | ||
const commonjs: any = require('rollup-plugin-commonjs'); | ||
/* tslint:enable */ | ||
|
||
describe('rollup bundle', () => { | ||
it('can be created', (done) => { | ||
rollup.rollup({ | ||
entry: join(__dirname, '../../test/bundle/bundleTest.js'), | ||
onwarn: () => false, | ||
context: 'global', | ||
plugins: [ resolve(), commonjs({ include: ['node_modules/**', 'lib/**'] }) ], | ||
}).then((bundle: any) => { | ||
return bundle.write({ | ||
// output format - 'amd', 'cjs', 'es', 'iife', 'umd' | ||
format: 'iife', | ||
dest: join(__dirname, './bundle/bundleTestOut.js'), | ||
}); | ||
}).then(() => done()) | ||
.catch(done); | ||
}); | ||
it('can be evaluated', () => { | ||
/* tslint:disable */ | ||
require(join(__dirname, './bundle/bundleTestOut.js')); | ||
/* tslint:enable */ | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters