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,26 +12,10 @@
|
|||
* 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/parser_spec', ['exports', 'pdfjs/core/parser',
|
||||
'pdfjs/core/primitives', 'pdfjs/core/stream'], factory);
|
||||
} else if (typeof exports !== 'undefined') {
|
||||
factory(exports, require('../../src/core/parser.js'),
|
||||
require('../../src/core/primitives.js'),
|
||||
require('../../src/core/stream.js'));
|
||||
} else {
|
||||
factory((root.pdfjsTestUnitParserSpec = {}), root.pdfjsCoreParser,
|
||||
root.pdfjsCorePrimitives, root.pdfjsCoreStream);
|
||||
}
|
||||
}(this, function (exports, coreParser, corePrimitives, coreStream) {
|
||||
|
||||
var Lexer = coreParser.Lexer;
|
||||
var Linearization = coreParser.Linearization;
|
||||
var Name = corePrimitives.Name;
|
||||
var StringStream = coreStream.StringStream;
|
||||
import { Lexer, Linearization } from '../../src/core/parser';
|
||||
import { Name } from '../../src/core/primitives';
|
||||
import { StringStream } from '../../src/core/stream';
|
||||
|
||||
describe('parser', function() {
|
||||
describe('Lexer', function() {
|
||||
|
@ -294,4 +278,3 @@ describe('parser', function() {
|
|||
});
|
||||
});
|
||||
});
|
||||
}));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue