-
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
16 changed files
with
6,302 additions
and
6,087 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,14 +10,14 @@ jobs: | |
needs: test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
lfs: true | ||
ref: ${{ github.event.pull_request.head.repo.full_name == github.repository && | ||
github.event.pull_request.head.ref || '' }} | ||
- uses: actions/setup-node@v3 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 16 | ||
node-version: 20 | ||
- run: git config --global user.email "[email protected]" | ||
- run: git config --global user.name "GitHub Actions" | ||
- run: yarn --frozen-lockfile | ||
|
@@ -38,11 +38,11 @@ jobs: | |
needs: cancel-existing | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
lfs: true | ||
- uses: actions/setup-node@v3 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node }} | ||
- run: yarn --frozen-lockfile | ||
|
@@ -54,18 +54,20 @@ jobs: | |
with: | ||
name: Image Snapshot Diffs | ||
path: "**/__image_snapshots__/__diff_output__" | ||
- if: matrix.os == 'ubuntu-latest' && matrix.node == 16 | ||
- if: matrix.os == 'ubuntu-latest' && matrix.node == 20 | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
strategy: | ||
matrix: | ||
include: | ||
- node: 16 | ||
- node: 18 | ||
os: ubuntu-latest | ||
- node: 16 | ||
- node: 20 | ||
os: ubuntu-latest | ||
- node: 20 | ||
os: macos-latest | ||
- node: 16 | ||
- node: 20 | ||
os: windows-latest | ||
name: build | ||
on: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ jobs: | |
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- uses: jaid/[email protected] | ||
with: | ||
approve: false | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,9 @@ | |
":semanticCommits", | ||
":semanticPrefixFix" | ||
], | ||
"gitIgnoredAuthors": [ | ||
"[email protected]" | ||
], | ||
"github-actions": { | ||
"enabled": false | ||
}, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ Copyright © Sebastian Landwehr <[email protected]> | |
|
||
and licensed under: | ||
|
||
[MIT License](https://opensource.org/licenses/MIT) | ||
[MIT License](https://opensource.org/license/mit/) | ||
|
||
## MIT License | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -472,7 +472,7 @@ export default { | |
'SMTP config is missing.', | ||
) | ||
}, | ||
async nuxt2() { | ||
async 'nuxt2: client side'() { | ||
await outputFiles({ | ||
'nuxt.config.js': endent` | ||
export default { | ||
|
@@ -487,17 +487,21 @@ export default { | |
`, | ||
'pages/index.vue': endent` | ||
<template> | ||
<div /> | ||
<button @click="send" /> | ||
</template> | ||
<script> | ||
export default { | ||
asyncData: context => context.$mail.send({ | ||
from: '[email protected]', | ||
subject: 'Incredible', | ||
text: 'This is an incredible test message', | ||
to: '[email protected]', | ||
}) | ||
methods: { | ||
send() { | ||
this.$mail.send({ | ||
from: '[email protected]', | ||
subject: 'Incredible', | ||
text: 'This is an incredible test message', | ||
to: '[email protected]', | ||
}) | ||
}, | ||
}, | ||
} | ||
</script> | ||
`, | ||
|
@@ -510,10 +514,13 @@ export default { | |
const nuxt = execa(P.join('node_modules', '.bin', 'nuxt'), ['dev']) | ||
try { | ||
await nuxtDevReady() | ||
await this.page.goto('http://localhost:3000') | ||
|
||
const button = await this.page.waitForSelector('button') | ||
|
||
const [capture] = await Promise.all([ | ||
this.mailServer.captureOne('[email protected]'), | ||
this.page.goto('http://localhost:3000'), | ||
button.click(), | ||
]) | ||
expect(capture.email.body).toEqual('This is an incredible test message') | ||
expect(capture.email.headers.subject).toEqual('Incredible') | ||
|
@@ -523,36 +530,23 @@ export default { | |
await kill(nuxt.pid) | ||
} | ||
}, | ||
async 'nuxt2: client side'() { | ||
'nuxt2: error': async () => { | ||
await outputFiles({ | ||
'nuxt.config.js': endent` | ||
export default { | ||
modules: [ | ||
'${packageName`@nuxtjs/axios`}', | ||
['~/../src/index.js', { | ||
message: { to: 'johndoe@gmail.com' }, | ||
smtp: { port: 3001 }, | ||
message: [{ to: 'foo@bar.com' }], | ||
smtp: {}, | ||
}], | ||
], | ||
} | ||
`, | ||
'pages/index.vue': endent` | ||
<template> | ||
<button @click="send" /> | ||
</template> | ||
<script> | ||
export default { | ||
methods: { | ||
send() { | ||
this.$mail.send({ | ||
from: '[email protected]', | ||
subject: 'Incredible', | ||
text: 'This is an incredible test message', | ||
to: '[email protected]', | ||
}) | ||
}, | ||
}, | ||
asyncData: context => context.$mail.send({ config: 10 }) | ||
} | ||
</script> | ||
`, | ||
|
@@ -565,39 +559,43 @@ export default { | |
const nuxt = execa(P.join('node_modules', '.bin', 'nuxt'), ['dev']) | ||
try { | ||
await nuxtDevReady() | ||
await this.page.goto('http://localhost:3000') | ||
|
||
const button = await this.page.waitForSelector('button') | ||
|
||
const [capture] = await Promise.all([ | ||
this.mailServer.captureOne('[email protected]'), | ||
button.click(), | ||
]) | ||
expect(capture.email.body).toEqual('This is an incredible test message') | ||
expect(capture.email.headers.subject).toEqual('Incredible') | ||
expect(capture.email.headers.from).toEqual('[email protected]') | ||
expect(capture.email.headers.to).toEqual('[email protected]') | ||
let errorMessage | ||
try { | ||
console.log(await axios.post('http://localhost:3000')) | ||
} catch (error) { | ||
errorMessage = error.response.data.error.message | ||
} | ||
expect(errorMessage).toEqual('Message config not found at index 10.') | ||
} finally { | ||
await kill(nuxt.pid) | ||
} | ||
}, | ||
'nuxt2: error': async () => { | ||
async 'nuxt2: works'() { | ||
await outputFiles({ | ||
'nuxt.config.js': endent` | ||
export default { | ||
modules: [ | ||
'${packageName`@nuxtjs/axios`}', | ||
['~/../src/index.js', { | ||
message: [{ to: 'foo@bar.com' }], | ||
smtp: {}, | ||
message: { to: 'johndoe@gmail.com' }, | ||
smtp: { port: 3001 }, | ||
}], | ||
], | ||
} | ||
`, | ||
'pages/index.vue': endent` | ||
<template> | ||
<div /> | ||
</template> | ||
<script> | ||
export default { | ||
asyncData: context => context.$mail.send({ config: 10 }) | ||
asyncData: context => context.$mail.send({ | ||
from: '[email protected]', | ||
subject: 'Incredible', | ||
text: 'This is an incredible test message', | ||
to: '[email protected]', | ||
}) | ||
} | ||
</script> | ||
`, | ||
|
@@ -610,13 +608,15 @@ export default { | |
const nuxt = execa(P.join('node_modules', '.bin', 'nuxt'), ['dev']) | ||
try { | ||
await nuxtDevReady() | ||
let errorMessage | ||
try { | ||
console.log(await axios.post('http://localhost:3000')) | ||
} catch (error) { | ||
errorMessage = error.response.data.error.message | ||
} | ||
expect(errorMessage).toEqual('Message config not found at index 10.') | ||
|
||
const [capture] = await Promise.all([ | ||
this.mailServer.captureOne('[email protected]'), | ||
this.page.goto('http://localhost:3000'), | ||
]) | ||
expect(capture.email.body).toEqual('This is an incredible test message') | ||
expect(capture.email.headers.subject).toEqual('Incredible') | ||
expect(capture.email.headers.from).toEqual('[email protected]') | ||
expect(capture.email.headers.to).toEqual('[email protected]') | ||
} finally { | ||
await kill(nuxt.pid) | ||
} | ||
|
Oops, something went wrong.