wikibase-edit
Version:
Edit Wikibase from NodeJS
19 lines • 744 B
JavaScript
import 'should';
import { mergeEntity } from '../../../src/lib/entity/merge.js';
describe('entity merge', () => {
describe('items', () => {
it('should set the action to wbmergeitems', () => {
mergeEntity({ from: 'Q1', to: 'Q2' }).action.should.equal('wbmergeitems');
});
it('should reject invalid item ids', () => {
mergeEntity.bind(null, { from: 'Q1', to: 'P' }).should.throw();
mergeEntity.bind(null, { from: '1', to: 'Q2' }).should.throw();
});
});
describe('properties', () => {
it('should reject properties', () => {
mergeEntity.bind(null, { from: 'P1', to: 'P2' }).should.throw();
});
});
});
//# sourceMappingURL=merge.js.map