Skip to content

Commit 2d3d1aa

Browse files
committed
fix(tests): await mjml2html result
1 parent 6263c2b commit 2d3d1aa

14 files changed

+249
-646
lines changed

packages/mjml/test/accordion-fontFamily.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const { load } = require('cheerio')
33
const mjml = require('../lib')
44

55
describe('mj-accordion font-family inheritance', function () {
6-
it('should render correct font-family in CSS style values on accordion-title and accordion-text', function () {
6+
it('should render correct font-family in CSS style values on accordion-title and accordion-text', async function () {
77
const input = `
88
<mjml>
99
<mj-body>
@@ -35,7 +35,7 @@ describe('mj-accordion font-family inheritance', function () {
3535
</mjml>
3636
`
3737

38-
const { html } = mjml(input)
38+
const { html } = await mjml(input)
3939

4040
const $ = load(html)
4141

packages/mjml/test/accordion-padding.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const { load } = require('cheerio')
33
const mjml = require('../lib')
44

55
describe('mj-accordion padding-X', function () {
6-
it('should render correct padding in CSS style values on accordion-title and accordion-text', function () {
6+
it('should render correct padding in CSS style values on accordion-title and accordion-text', async function () {
77
const input = `
88
<mjml>
99
<mj-body>
@@ -23,7 +23,7 @@ describe('mj-accordion padding-X', function () {
2323
</mjml>
2424
`
2525

26-
const { html } = mjml(input)
26+
const { html } = await mjml(input)
2727
const $ = load(html)
2828

2929
function extractPadding(style, prop) {

packages/mjml/test/accordionTitle-fontWeight.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const { load } = require('cheerio')
33
const mjml = require('../lib')
44

55
describe('mj-accordion-title font-weight', function () {
6-
it('should render correct font-weight in CSS style values on accordion-title', function () {
6+
it('should render correct font-weight in CSS style values on accordion-title', async function () {
77
const input = `
88
<mjml>
99
<mj-head>
@@ -41,7 +41,7 @@ describe('mj-accordion-title font-weight', function () {
4141
</mjml>
4242
`
4343

44-
const { html } = mjml(input)
44+
const { html } = await mjml(input)
4545

4646
const $ = load(html)
4747

packages/mjml/test/carousel-hoverSupported.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const { load } = require('cheerio')
33
const mjml = require('../lib')
44

55
describe('mj-carousel-thumbnail thumbnails supported', function () {
6-
it('should render correct display in CSS style values on mj-carousel-thumbnail', function () {
6+
it('should render correct display in CSS style values on mj-carousel-thumbnail', async function () {
77
const input = `
88
<mjml>
99
<mj-body>
@@ -20,7 +20,7 @@ describe('mj-carousel-thumbnail thumbnails supported', function () {
2020
</mjml>
2121
`
2222

23-
const { html } = mjml(input)
23+
const { html } = await mjml(input)
2424

2525
const $ = load(html)
2626

packages/mjml/test/column-border-radius.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const { load } = require('cheerio')
33
const mjml = require('../lib')
44

55
describe('mj-column border-radius', function () {
6-
it('should render correct border-radius / inner-border-radius (and border-collapse) in CSS style values on mj-column', function () {
6+
it('should render correct border-radius / inner-border-radius (and border-collapse) in CSS style values on mj-column', async function () {
77
const input = `
88
<mjml>
99
<mj-body>
@@ -16,7 +16,7 @@ describe('mj-column border-radius', function () {
1616
</mjml>
1717
`
1818

19-
const { html } = mjml(input)
19+
const { html } = await mjml(input)
2020

2121
const $ = load(html)
2222

packages/mjml/test/html-comments.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const chai = require('chai')
22
const mjml = require('../lib')
33

44
describe('HTML comments', function () {
5-
it('should not alter the whitespace between the opening/closing comment tags and the comment content', function () {
5+
it('should not alter the whitespace between the opening/closing comment tags and the comment content', async function () {
66
const input = `
77
<mjml>
88
<mj-body>
@@ -22,7 +22,7 @@ describe('HTML comments', function () {
2222
</mjml>
2323
`
2424

25-
const { html } = mjml(input)
25+
const { html } = await mjml(input)
2626

2727
// should not alter templating syntax, or move the content that is outside any tag (mj-raws)
2828
const expected = [

packages/mjml/test/navbar-ico-padding.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const { load } = require('cheerio')
33
const mjml = require('../lib')
44

55
describe('mj-navbar ico-padding-X', function () {
6-
it('should render correct padding in CSS style values on navbar hamburger icon', function () {
6+
it('should render correct padding in CSS style values on navbar hamburger icon', async function () {
77
const input = `
88
<mjml>
99
<mj-body>
@@ -19,7 +19,7 @@ describe('mj-navbar ico-padding-X', function () {
1919
</mjml>
2020
`
2121

22-
const { html } = mjml(input)
22+
const { html } = await mjml(input)
2323
const $ = load(html)
2424

2525
function extractPadding(style, prop) {

packages/mjml/test/social-align.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const { load } = require('cheerio')
33
const mjml = require('../lib')
44

55
describe('mj-social-element align', function () {
6-
it('should render correct align in CSS style values on mj-social-element', function () {
6+
it('should render correct align in CSS style values on mj-social-element', async function () {
77
const input = `
88
<mjml>
99
<mj-body>
@@ -20,7 +20,7 @@ describe('mj-social-element align', function () {
2020
</mjml>
2121
`
2222

23-
const { html } = mjml(input)
23+
const { html } = await mjml(input)
2424

2525
const $ = load(html)
2626

packages/mjml/test/social-icon-height.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const { load } = require('cheerio')
33
const mjml = require('../lib')
44

55
describe('mj-social icon-height', function () {
6-
it('should render correct icon-height align in CSS style values on mj-social', function () {
6+
it('should render correct icon-height align in CSS style values on mj-social', async function () {
77
const input = `
88
<mjml>
99
<mj-body>
@@ -20,7 +20,7 @@ describe('mj-social icon-height', function () {
2020
</mjml>
2121
`
2222

23-
const { html } = mjml(input)
23+
const { html } = await mjml(input)
2424

2525
const $ = load(html)
2626

packages/mjml/test/table-cellspacing.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ const { load } = require('cheerio')
33
const mjml = require('../lib')
44

55
describe('mj-table cellspacing', function () {
6-
it('should render correct cellspacing (and border-collapse) in HTML tag / CSS style values on mj-table', function () {
6+
it('should render correct cellspacing (and border-collapse) in HTML tag / CSS style values on mj-table', async function () {
77
const input = `
88
<mjml>
99
<mj-body>
@@ -27,7 +27,7 @@ describe('mj-table cellspacing', function () {
2727
</mjml>
2828
`
2929

30-
const { html } = mjml(input)
30+
const { html } = await mjml(input)
3131

3232
const $ = load(html)
3333

0 commit comments

Comments
 (0)