From d19cdcae0c26eb6442b6b0161bd3c812b8923dbc Mon Sep 17 00:00:00 2001 From: Dolan Date: Fri, 11 Jan 2019 01:45:57 +0000 Subject: [PATCH] Rename methods --- src/file/styles/external-styles-factory.spec.ts | 10 +++++----- src/file/xml-components/imported-xml-component.spec.ts | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/file/styles/external-styles-factory.spec.ts b/src/file/styles/external-styles-factory.spec.ts index 5bc7925e8d..329366a864 100644 --- a/src/file/styles/external-styles-factory.spec.ts +++ b/src/file/styles/external-styles-factory.spec.ts @@ -52,7 +52,7 @@ describe("External styles factory", () => { const importedStyle = new ExternalStylesFactory().newInstance(externalStyles) as any; expect(importedStyle.rootKey).to.equal("w:styles"); - expect(importedStyle.root[0]._attr).to.eql({ + expect(importedStyle.root[0]._attr).to.deep.equal({ "xmlns:mc": "first", "xmlns:r": "second", }); @@ -61,7 +61,7 @@ describe("External styles factory", () => { it("should parse other child elements of w:styles", () => { // tslint:disable-next-line:no-any const importedStyle = new ExternalStylesFactory().newInstance(externalStyles) as any; - expect(importedStyle.root[1]).to.eql({ + expect(importedStyle.root[1]).to.deep.equal({ deleted: false, root: [ { @@ -122,7 +122,7 @@ describe("External styles factory", () => { ], rootKey: "w:docDefaults", }); - expect(importedStyle.root[2]).to.eql({ + expect(importedStyle.root[2]).to.deep.equal({ _attr: { "w:defLockedState": "1", "w:defUIPriority": "99", @@ -138,7 +138,7 @@ describe("External styles factory", () => { const importedStyle = new ExternalStylesFactory().newInstance(externalStyles) as any; expect(importedStyle.root.length).to.equal(5); - expect(importedStyle.root[3]).to.eql({ + expect(importedStyle.root[3]).to.deep.equal({ _attr: { "w:default": "1", "w:styleId": "Normal", @@ -163,7 +163,7 @@ describe("External styles factory", () => { rootKey: "w:style", }); - expect(importedStyle.root[4]).to.eql({ + expect(importedStyle.root[4]).to.deep.equal({ _attr: { "w:styleId": "Heading1", "w:type": "paragraph", diff --git a/src/file/xml-components/imported-xml-component.spec.ts b/src/file/xml-components/imported-xml-component.spec.ts index e896633850..3d883fa908 100644 --- a/src/file/xml-components/imported-xml-component.spec.ts +++ b/src/file/xml-components/imported-xml-component.spec.ts @@ -50,7 +50,7 @@ describe("ImportedXmlComponent", () => { describe("#prepForXml()", () => { it("should transform for xml", () => { const converted = importedXmlComponent.prepForXml(); - expect(converted).to.eql({ + expect(converted).to.deep.equal({ "w:test": [ { _attr: { @@ -68,14 +68,14 @@ describe("ImportedXmlComponent", () => { it("should create XmlComponent from xml string", () => { const converted = ImportedXmlComponent.fromXmlString(xmlString); - expect(converted).to.eql(convertedXmlElement); + expect(converted).to.deep.equal(convertedXmlElement); }); describe("convertToXmlComponent", () => { it("should convert to xml component", () => { const xmlObj = xml2js(xmlString, { compact: false }) as Element; const converted = convertToXmlComponent(xmlObj); - expect(converted).to.eql(convertedXmlElement); + expect(converted).to.deep.equal(convertedXmlElement); }); }); });