const generator = require('./index') generator.write('/tmp/filename.xml', '0596101198') test('the xml generator to work', () => { let input = { "title": "Open Source for the Enterprise", "publishedDate": "July 27, 2005", "authors": [ "Dan Woods", "Gautam Guliani" ], "description": "Managing Risks, Reaping Rewards", "industryIdentifiers": [ { "type": "ISBN-13", "identifier": [ "9780596101190" ] }, { "type": "ISBN-10", "identifier": [ "0596101198" ] } ], "pageCount": 234, "printType": "BOOK", "categories": [], "imageLinks": { "smallThumbnail": "https://covers.openlibrary.org/b/id/389214-S.jpg", "thumbnail": "https://covers.openlibrary.org/b/id/389214-S.jpg" }, "previewLink": "https://openlibrary.org/books/OL7581318M/Open_Source_for_the_Enterprise", "infoLink": "https://openlibrary.org/books/OL7581318M/Open_Source_for_the_Enterprise", "publisher": "O'Reilly Media, Inc.", "language": "eng" } let xml = generator._convert(input, false) expect(xml).toBe(`97805961011900596101198Dan WoodsGautam GulianiOpen Source for the EnterpriseManaging Risks, Reaping RewardssubtitleengO'Reilly Media, Inc.`); })