Commit 2d930954 authored by tobinski's avatar tobinski
Browse files

Update test

parent ac3121e4
......@@ -32,11 +32,15 @@ describe('Test WikiNormalizer', () => {
});
it('Try to transform data', (done) => {
const normalizer = new WikidataNormalizerTransformer({objectMode: true, logger: coreMock.getLogger(), wikidataPropertiesInstance: wikidataTimeProperties});
const options = {
objectMode: true,
logger: coreMock.getLogger(),
wikidataPropertiesInstance: wikidataTimeProperties,
};
const normalizer = new WikidataNormalizerTransformer(options);
// listener to check output
normalizer.on('data', (data) => {
console.log(data);
data.should.have.any.keys('id', 'name', 'alternative_name:', 'instances_of',
'lat', 'lon', 'part_of', 'country', 'inception', 'elevation', 'described_by',
'norm_identifiers', 'modification_date', 'location', 'provider');
......@@ -53,7 +57,12 @@ describe('Test WikiNormalizer', () => {
});
it('Try to transform in a pipline', (done) => {
const normalizer = new WikidataNormalizerTransformer({objectMode: true, logger: coreMock.getLogger(), wikidataPropertiesInstance: wikidataTimeProperties});
const options = {
objectMode: true,
logger: coreMock.getLogger(),
wikidataPropertiesInstance: wikidataTimeProperties,
};
const normalizer = new WikidataNormalizerTransformer(options);
const mockReporter = new MockReporter();
const writeable = new MockWriteable({objectMode: true});
......@@ -79,7 +88,12 @@ describe('Test WikiNormalizer', () => {
});
it('Try to transform in a wrong data', (done) => {
const normalizer = new WikidataNormalizerTransformer({objectMode: true, logger: coreMock.getLogger(), wikidataPropertiesInstance: wikidataTimeProperties});
const options = {
objectMode: true,
logger: coreMock.getLogger(),
wikidataPropertiesInstance: wikidataTimeProperties,
};
const normalizer = new WikidataNormalizerTransformer(options);
const mockReporter = new MockReporter();
const writeable = new MockWriteable({objectMode: true});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment