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