move tests dir to root
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
module.exports = {
|
||||
verbose: true,
|
||||
testEnvironment: 'node',
|
||||
globalSetup: '<rootDir>/src/tests/api/globalSetup.js',
|
||||
globalTeardown: '<rootDir>/src/tests/api/globalTeardown.js',
|
||||
globalSetup: '<rootDir>/tests/api/globalSetup.js',
|
||||
globalTeardown: '<rootDir>/tests/api/globalTeardown.js',
|
||||
testPathIgnorePatterns: [
|
||||
'node_modules',
|
||||
'src/client/*',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
require('isomorphic-fetch');
|
||||
const faker = require('faker');
|
||||
const { email, password } = require('../tests/api/credentials');
|
||||
const { email, password } = require('../../tests/api/credentials');
|
||||
|
||||
/**
|
||||
* @jest-environment node
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
const fetch = require('isomorphic-fetch');
|
||||
const { request, GraphQLClient } = require('graphql-request');
|
||||
const getConfig = require('../../../utilities/getConfig');
|
||||
const { email, password } = require('../../../tests/api/credentials');
|
||||
const { email, password } = require('../../../../tests/api/credentials');
|
||||
|
||||
const config = getConfig();
|
||||
|
||||
|
||||
@@ -8,8 +8,8 @@ require('isomorphic-fetch');
|
||||
const faker = require('faker');
|
||||
const FormData = require('form-data');
|
||||
const getConfig = require('../../utilities/getConfig');
|
||||
const { email, password } = require('../../tests/api/credentials');
|
||||
const fileExists = require('../../tests/api/utils/fileExists');
|
||||
const { email, password } = require('../../../tests/api/credentials');
|
||||
const fileExists = require('../../../tests/api/utils/fileExists');
|
||||
|
||||
const { serverURL: url } = getConfig();
|
||||
|
||||
@@ -657,7 +657,7 @@ describe('Collections - REST', () => {
|
||||
|
||||
it('create', async () => {
|
||||
const formData = new FormData();
|
||||
formData.append('file', fs.createReadStream(path.join(__dirname, '../..', 'tests/api/assets/image.png')));
|
||||
formData.append('file', fs.createReadStream(path.join(__dirname, '../../..', 'tests/api/assets/image.png')));
|
||||
formData.append('alt', 'test media');
|
||||
formData.append('locale', 'en');
|
||||
|
||||
@@ -690,7 +690,7 @@ describe('Collections - REST', () => {
|
||||
|
||||
it('delete', async () => {
|
||||
const formData = new FormData();
|
||||
formData.append('file', fs.createReadStream(path.join(__dirname, '../..', 'tests/api/assets/delete.png')));
|
||||
formData.append('file', fs.createReadStream(path.join(__dirname, '../../..', 'tests/api/assets/delete.png')));
|
||||
formData.append('alt', 'test media');
|
||||
formData.append('locale', 'en');
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
require('isomorphic-fetch');
|
||||
const getConfig = require('../../utilities/getConfig');
|
||||
const { email, password } = require('../../tests/api/credentials');
|
||||
const { email, password } = require('../../../tests/api/credentials');
|
||||
|
||||
const { serverURL: url } = getConfig();
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 88 KiB |
|
Before Width: | Height: | Size: 88 KiB After Width: | Height: | Size: 88 KiB |
@@ -1,7 +1,7 @@
|
||||
require('isomorphic-fetch');
|
||||
|
||||
const server = require('../../../demo/server');
|
||||
const getConfig = require('../../utilities/getConfig');
|
||||
const server = require('../../demo/server');
|
||||
const getConfig = require('../../src/utilities/getConfig');
|
||||
const { email, password } = require('./credentials');
|
||||
|
||||
const { serverURL } = getConfig();
|
||||
Reference in New Issue
Block a user