Reformat files using prettier
This commit is contained in:
@@ -1,30 +1,30 @@
|
||||
import fs from "fs";
|
||||
import "mocha";
|
||||
import should from "should";
|
||||
import stream from "stream";
|
||||
import zlib from "zlib";
|
||||
import fs from 'fs'
|
||||
import 'mocha'
|
||||
import should from 'should'
|
||||
import stream from 'stream'
|
||||
import zlib from 'zlib'
|
||||
|
||||
import { XmlParser } from "../src/parser";
|
||||
describe("CData and comments in xml", () => {
|
||||
it("should properly parse a simple file.", (done) => {
|
||||
const xmlStream = fs.createReadStream("./test/TestFiles/CData-comments.xml");
|
||||
const parser = new XmlParser({ resourcePath: "/items/item" });
|
||||
import { XmlParser } from '../src/parser'
|
||||
describe('CData and comments in xml', () => {
|
||||
it('should properly parse a simple file.', (done) => {
|
||||
const xmlStream = fs.createReadStream('./test/TestFiles/CData-comments.xml')
|
||||
const parser = new XmlParser({ resourcePath: '/items/item' })
|
||||
|
||||
let dataEventCount = 0;
|
||||
let dataEventCount = 0
|
||||
|
||||
parser.on("data", (data) => {
|
||||
dataEventCount++;
|
||||
});
|
||||
parser.on('data', (data) => {
|
||||
dataEventCount++
|
||||
})
|
||||
|
||||
parser.on("error", (err) => {
|
||||
done(err);
|
||||
});
|
||||
parser.on('error', (err) => {
|
||||
done(err)
|
||||
})
|
||||
|
||||
parser.on("end", () => {
|
||||
parser.on('end', () => {
|
||||
// console.log('dataEventCount=', dataEventCount)
|
||||
should(dataEventCount).equal(296);
|
||||
done();
|
||||
});
|
||||
xmlStream.pipe(parser);
|
||||
});
|
||||
});
|
||||
should(dataEventCount).equal(296)
|
||||
done()
|
||||
})
|
||||
xmlStream.pipe(parser)
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user