@alchemycodelab/create-app
Advanced tools
Comparing version 1.3.2 to 1.4.0
@@ -12,3 +12,2 @@ const path = require('path'); | ||
'@types/jest', | ||
'alchemy-jest-slack-reporter', | ||
'eslint', | ||
@@ -15,0 +14,0 @@ 'jest', |
@@ -0,2 +1,6 @@ | ||
const { MongoMemoryServer } = require('mongodb-memory-server'); | ||
const mongod = new MongoMemoryServer(); | ||
const mongoose = require('mongoose'); | ||
const connect = require('../lib/utils/connect'); | ||
const request = require('supertest'); | ||
@@ -6,5 +10,15 @@ const app = require('../lib/app'); | ||
describe('{{appName}} routes', () => { | ||
beforeAll(async() => { | ||
const uri = await mongod.getUri(); | ||
return connect(uri); | ||
}); | ||
beforeEach(() => { | ||
return mongoose.connection.dropDatabase(); | ||
}); | ||
afterAll(async() => { | ||
await mongoose.connection.close(); | ||
return mongod.stop(); | ||
}); | ||
}); |
@@ -6,4 +6,3 @@ const express = require('express'); | ||
app.use('/api/v1/reports', require('./routes/reports')); | ||
app.use('/api/v1/runs', require('./routes/runs')); | ||
app.use('/api/v1/RESOURCE', require('./routes/RESOURCE')); | ||
@@ -10,0 +9,0 @@ app.use(require('./middleware/not-found')); |
@@ -13,5 +13,3 @@ { | ||
"jest": { | ||
"testEnvironment": "node", | ||
"globalSetup": "alchemy-jest-slack-reporter/setup.js", | ||
"globalTeardown": "alchemy-jest-slack-reporter/teardown.js" | ||
"testEnvironment": "node" | ||
}, | ||
@@ -18,0 +16,0 @@ "keywords": [], |
{ | ||
"name": "@alchemycodelab/create-app", | ||
"version": "1.3.2", | ||
"version": "1.4.0", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "repository": { |
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
3
18163
379