mirror of
https://github.com/wassname/talk.git
synced 2026-07-19 11:28:50 +08:00
Adding mocks file.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
node_modules/selenium-standalone/bin/selenium-standalone install
|
||||
source .env-test
|
||||
echo $TALK_MONGO_URL
|
||||
node tests/e2e/mocks &
|
||||
npm start &
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
const Comments = require('../../models/comment')
|
||||
const Users = require('../../models/user')
|
||||
const Actions = require('../../models/action')
|
||||
|
||||
const mockComments = [
|
||||
{
|
||||
body: 'Pangolin pups are called pangopups.',
|
||||
author_id: '123',
|
||||
id: 'abc'
|
||||
},
|
||||
{
|
||||
body: 'Baby whales grow at up to 8lbs an hour.',
|
||||
author_id: '456',
|
||||
id: 'def'
|
||||
}
|
||||
];
|
||||
|
||||
console.log('Loading mocks.');
|
||||
|
||||
Comments.create(mockComments);
|
||||
Reference in New Issue
Block a user