diff --git a/src/__snapshots__/index.test.ts.snap b/src/__snapshots__/index.test.ts.snap index 902e95f..9aca2bd 100644 --- a/src/__snapshots__/index.test.ts.snap +++ b/src/__snapshots__/index.test.ts.snap @@ -2,53 +2,53 @@ exports[`render returns the template json 1`] = ` { - "absoluteFilePath": "/Users/jody/Downloads/Repositories/mjml-testing-library", + "absoluteFilePath": "/", "attributes": {}, "children": [ { - "absoluteFilePath": "/Users/jody/Downloads/Repositories/mjml-testing-library", + "absoluteFilePath": "/", "attributes": {}, "children": [ { - "absoluteFilePath": "/Users/jody/Downloads/Repositories/mjml-testing-library", + "absoluteFilePath": "/", "attributes": {}, "children": [ { - "absoluteFilePath": "/Users/jody/Downloads/Repositories/mjml-testing-library", + "absoluteFilePath": "/", "attributes": {}, "children": [ { - "absoluteFilePath": "/Users/jody/Downloads/Repositories/mjml-testing-library", + "absoluteFilePath": "/", "attributes": { "color": "blue", "font-size": "10px", }, "content": "This is some text", - "file": ".", + "file": "/", "includedIn": [], "line": 7, "tagName": "mj-text", }, ], - "file": ".", + "file": "/", "includedIn": [], "line": 6, "tagName": "mj-column", }, ], - "file": ".", + "file": "/", "includedIn": [], "line": 5, "tagName": "mj-section", }, ], - "file": ".", + "file": "/", "includedIn": [], "line": 3, "tagName": "mj-body", }, ], - "file": ".", + "file": "/", "includedIn": [], "line": 2, "tagName": "mjml", diff --git a/src/index.test.ts b/src/index.test.ts index f7ff147..df5d794 100644 --- a/src/index.test.ts +++ b/src/index.test.ts @@ -58,9 +58,13 @@ describe('render', () => { }); it('returns the template json', () => { - const renderedJson = mjml2html(wrappedTemplate).json; + const renderedJson = mjml2html(wrappedTemplate, { + actualPath: '/', + }).json; - const { json } = render(wrappedTemplate); + const { json } = render(wrappedTemplate, { + mjmlOptions: { actualPath: '/' }, + }); expect(json).toStrictEqual(renderedJson); expect(json).toMatchSnapshot(); });