Skip to content

Node.js based forum software built for the modern web

test: add mising email.test tpls

Barış Soner Uşaklı6d186ff10dd9
diff --git a/test/socket.io.js b/test/socket.io.js
index f709e86178..5c890809f1 100644
--- a/test/socket.io.js
+++ b/test/socket.io.js
@@ -244,7 +244,6 @@ describe('socket.io', () => {
});
describe('validation emails', () => {
- const meta = require('../src/meta');
const plugins = require('../src/plugins');
async function dummyEmailerHook(data) {
@@ -567,11 +566,16 @@ describe('socket.io', () => {
});
});
- it('should send test email', (done) => {
- socketAdmin.email.test({ uid: adminUid }, { template: 'digest.tpl' }, (err) => {
+ it('should send test email', async () => {
+ const tpls = ['digest', 'test', 'verify', 'welcome', 'notification', 'invitation'];
+ try {
+ for (const tpl of tpls) {
+ // eslint-disable-next-line no-await-in-loop
+ await socketAdmin.email.test({ uid: adminUid }, { template: tpl });
+ }
+ } catch (err) {
assert.ifError(err);
- done();
- });
+ }
});
it('should not error when resending digests', async () => {