Skip to content

Commit

Permalink
feat(mellow-svelte): add testing environment
Browse files Browse the repository at this point in the history
  • Loading branch information
DominusKelvin committed Sep 23, 2024
1 parent 9e558e1 commit 21f11d6
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
27 changes: 27 additions & 0 deletions templates/mellow-svelte/config/env/testing.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
module.exports = {
port: 3333,
hooks: {
// Uncomment if you have the apianalytics hook and you don't want to see logs
// from it during testing
// apianalytics: false
},
log: {
level: 'error'
},
models: {
migrate: 'drop'
},
datastores: {
default: {
adapter: 'sails-disk'
}
},
mail: {
default: 'log',
mailers: {
log: {
transport: 'log'
}
}
}
}
4 changes: 2 additions & 2 deletions templates/mellow-svelte/tests/unit/helpers.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('sails.helpers.capitalize()', () => {
before(async () => {
sails = await new Promise((resolve, reject) => {
sailsApp.load(
{ environment: 'test', hooks: { shipwright: false } },
{ environment: 'testing', hooks: { shipwright: false } },
(err, sailsInstance) => {
if (err) {
return reject(err)
Expand Down Expand Up @@ -49,7 +49,7 @@ describe('sails.helpers.getUserIntials()', () => {
before(async () => {
sails = await new Promise((resolve, reject) => {
sailsApp.load(
{ environment: 'test', hooks: { shipwright: false } },
{ environment: 'testing', hooks: { shipwright: false } },
(err, sailsInstance) => {
if (err) {
return reject(err)
Expand Down

0 comments on commit 21f11d6

Please sign in to comment.