0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-01-20 22:52:46 -05:00

test: relocate unit test

This commit is contained in:
Juan Picado @jotadeveloper 2019-05-20 07:41:12 +02:00
parent 596c727a35
commit ca2e23cf9d
No known key found for this signature in database
GPG key ID: 18AC54485952D158
4 changed files with 11 additions and 10 deletions

View file

@ -26,6 +26,7 @@ const parseConfigurationJWTFile = () => {
const FORBIDDEN_VUE: string = 'authorization required to access package vue'; const FORBIDDEN_VUE: string = 'authorization required to access package vue';
describe('endpoint user auth JWT unit test', () => { describe('endpoint user auth JWT unit test', () => {
jest.setTimeout(20000);
let app; let app;
let mockRegistry; let mockRegistry;
const FAKE_TOKEN: string = buildToken(TOKEN_BEARER, 'fake'); const FAKE_TOKEN: string = buildToken(TOKEN_BEARER, 'fake');

View file

@ -1,8 +1,8 @@
let assert = require('assert'); let assert = require('assert');
let semverSort = require('../../../src/lib/utils').semverSort; let semverSort = require('../../../../src/lib/utils').semverSort;
import {mergeVersions} from '../../../src/lib/metadata-utils'; import {mergeVersions} from '../../../../src/lib/metadata-utils';
require('../../../src/lib/logger').setup([]); require('../../../../src/lib/logger').setup([]);
describe('Storage._merge_versions versions', () => { describe('Storage._merge_versions versions', () => {

View file

@ -2,20 +2,20 @@
import path from 'path'; import path from 'path';
import _ from 'lodash'; import _ from 'lodash';
import {spliceURL} from '../../../src/utils/string'; import {spliceURL} from '../../../../src/utils/string';
import {parseConfigFile} from '../../../src/lib/utils'; import {parseConfigFile} from '../../../../src/lib/utils';
import { import {
getMatchedPackagesSpec, getMatchedPackagesSpec,
hasProxyTo, hasProxyTo,
normalisePackageAccess, sanityCheckUplinksProps, normalisePackageAccess, sanityCheckUplinksProps,
uplinkSanityCheck uplinkSanityCheck
} from '../../../src/lib/config-utils'; } from '../../../../src/lib/config-utils';
import {PACKAGE_ACCESS, ROLES} from '../../../src/lib/constants'; import {PACKAGE_ACCESS, ROLES} from '../../../../src/lib/constants';
describe('Config Utilities', () => { describe('Config Utilities', () => {
const parseConfigurationFile = (name) => { const parseConfigurationFile = (name) => {
return path.join(__dirname, `../partials/config/yaml/${name}.yaml`); return path.join(__dirname, `../../partials/config/yaml/${name}.yaml`);
}; };
describe('uplinkSanityCheck', () => { describe('uplinkSanityCheck', () => {

View file

@ -1,7 +1,7 @@
let assert = require('assert'); let assert = require('assert');
let tag_version = require('../../../src/lib/utils').tagVersion; let tag_version = require('../../../../src/lib/utils').tagVersion;
require('../../../src/lib/logger').setup([]); require('../../../../src/lib/logger').setup([]);
describe('tag_version', () => { describe('tag_version', () => {
test('add new one', () => { test('add new one', () => {