mirror of
https://github.com/zen-browser/pdf.js.git
synced 2025-07-08 09:20:06 +02:00
Convert the files in the /test/unit
folder to ES6 modules
This commit is contained in:
parent
06c93d8fbd
commit
35730148a7
23 changed files with 139 additions and 521 deletions
|
@ -12,31 +12,13 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
define('pdfjs-test/unit/function_spec', ['exports',
|
||||
'pdfjs/core/function', 'pdfjs/core/ps_parser',
|
||||
'pdfjs/core/stream', 'pdfjs/shared/util'], factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports, require('../../src/core/function.js'),
|
||||
require('../../src/core/ps_parser.js'),
|
||||
require('../../src/core/stream.js'),
|
||||
require('../../src/shared/util.js'));
|
||||
} else {
|
||||
factory((root.pdfjsTestUnitFunctionSpec = {}),
|
||||
root.pdfjsCoreFunction, root.pdfjsCorePsParser,
|
||||
root.pdfjsCoreStream, root.pdfjsSharedUtil);
|
||||
}
|
||||
}(this, function (exports, coreFunction, corePsParser, coreStream, sharedUtil) {
|
||||
|
||||
var PostScriptEvaluator = coreFunction.PostScriptEvaluator;
|
||||
var PostScriptCompiler = coreFunction.PostScriptCompiler;
|
||||
var PostScriptParser = corePsParser.PostScriptParser;
|
||||
var PostScriptLexer = corePsParser.PostScriptLexer;
|
||||
var StringStream = coreStream.StringStream;
|
||||
var isArray = sharedUtil.isArray;
|
||||
import {
|
||||
PostScriptCompiler, PostScriptEvaluator
|
||||
} from '../../src/core/function';
|
||||
import { PostScriptLexer, PostScriptParser } from '../../src/core/ps_parser';
|
||||
import { isArray } from '../../src/shared/util';
|
||||
import { StringStream } from '../../src/core/stream';
|
||||
|
||||
describe('function', function() {
|
||||
beforeEach(function() {
|
||||
|
@ -564,4 +546,3 @@ describe('function', function() {
|
|||
});
|
||||
});
|
||||
});
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue