Move tests to separate folder
This commit is contained in:
+1
-1
@@ -14,7 +14,7 @@
|
||||
"dev": "ts-node src/index.ts",
|
||||
"test": "jest --config jestconfig.json",
|
||||
"build": "rm -rf pkg/ && pika build",
|
||||
"format": "prettier --write \"src/**/*.ts\"",
|
||||
"format": "prettier --write \"src/**/*.ts\" --write \"test/**/*.ts\"",
|
||||
"lint": "tslint -p tsconfig.json && yarn spell",
|
||||
"spell": "yaspeller .",
|
||||
"release": "pika publish",
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
test('Empty test', () => {
|
||||
expect(true).toBe(true)
|
||||
})
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Request } from './_types'
|
||||
import { fields } from './_fields'
|
||||
import { Request } from '../src'
|
||||
import { fields } from '../src/_fields'
|
||||
|
||||
// dumb object to test purity
|
||||
const dumb = { url: 'test', fields: { landscape: false } }
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Request } from './_types'
|
||||
import { headers } from './_headers'
|
||||
import { Request } from '../src'
|
||||
import { headers } from '../src/_headers'
|
||||
|
||||
// dumb object to test purity
|
||||
const dumb = { url: 'test', headers: { Test: 'Test' } }
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Request } from './_types'
|
||||
import { path } from './_path'
|
||||
import { Request } from '../src'
|
||||
import { path } from '../src/_path'
|
||||
|
||||
// dumb object to test purity
|
||||
const dumb = { url: 'test', fields: {} }
|
||||
@@ -10,7 +10,7 @@ import {
|
||||
isString,
|
||||
isTuple,
|
||||
isURL,
|
||||
} from './_source-checkers'
|
||||
} from '../src/_source-checkers'
|
||||
|
||||
// tslint:disable no-any
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Request, RequestType } from './_types'
|
||||
import { type } from './_type'
|
||||
import { Request, RequestType } from '../src'
|
||||
import { type } from '../src/_type'
|
||||
|
||||
// dumb object to test purity
|
||||
const dumb = { type: RequestType.Undefined, url: 'test' }
|
||||
@@ -1,4 +1,4 @@
|
||||
import { header, headers, webhookHeader, webhookHeaders } from './add-helpers'
|
||||
import { header, headers, webhookHeader, webhookHeaders } from '../src'
|
||||
|
||||
test('Test `header` function', () => {
|
||||
const object = {}
|
||||
@@ -1,6 +1,4 @@
|
||||
import { Request, RequestType } from './_types'
|
||||
import { add } from './add'
|
||||
import { headers } from './add-helpers'
|
||||
import { add, headers, Request, RequestType } from '../src'
|
||||
|
||||
// dumb object to test purity
|
||||
const dumb: Request = {
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Request } from './_types'
|
||||
import { convert } from './convert'
|
||||
import { convert, Request } from '../src'
|
||||
|
||||
// dumb object to test purity
|
||||
const dumb = { url: 'test', fields: {} }
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,5 +1,4 @@
|
||||
import { Request, RequestType } from './_types'
|
||||
import { html } from './html'
|
||||
import { html, Request, RequestType } from '../src'
|
||||
|
||||
// dumb object to test purity
|
||||
const dumb = { type: RequestType.Undefined, url: 'test', fields: {} }
|
||||
@@ -1,5 +1,5 @@
|
||||
const { createWriteStream } = require('fs')
|
||||
const { a4, convert, gotenberg, html, pipe, please, to } = require('../pkg')
|
||||
const { a4, convert, gotenberg, html, pipe, please, to } = require('../../pkg')
|
||||
|
||||
// need to run Gotenberg like this
|
||||
// docker run --rm -p 3500:3000 thecodingmachine/gotenberg:6
|
||||
@@ -1,5 +1,5 @@
|
||||
import { createWriteStream } from 'fs'
|
||||
import { a4, convert, gotenberg, html, pipe, please, to } from '../src'
|
||||
import { a4, convert, gotenberg, html, pipe, please, to } from '../../src'
|
||||
|
||||
// need to run Gotenberg like this
|
||||
// docker run --rm -p 3500:3000 thecodingmachine/gotenberg:6
|
||||
@@ -1,15 +1,5 @@
|
||||
import { createWriteStream } from 'fs'
|
||||
import {
|
||||
add,
|
||||
convert,
|
||||
gotenberg,
|
||||
headers,
|
||||
pipe,
|
||||
please,
|
||||
range,
|
||||
set,
|
||||
url,
|
||||
} from '../src'
|
||||
import { add, convert, gotenberg, headers, pipe, please, range, set, url } from '../../src'
|
||||
|
||||
// need to run Gotenberg like this
|
||||
// docker run --rm -p 3500:3000 thecodingmachine/gotenberg:6
|
||||
@@ -1,15 +1,5 @@
|
||||
import { createWriteStream } from 'fs'
|
||||
import {
|
||||
a4,
|
||||
convert,
|
||||
gotenberg,
|
||||
html,
|
||||
pipe,
|
||||
please,
|
||||
scale,
|
||||
set,
|
||||
to,
|
||||
} from '../src'
|
||||
import { a4, convert, gotenberg, html, pipe, please, scale, set, to } from '../../src'
|
||||
|
||||
// need to run Gotenberg like this
|
||||
// docker run --rm -p 3500:3000 thecodingmachine/gotenberg:6
|
||||
@@ -1,5 +1,5 @@
|
||||
import { createWriteStream, readFileSync } from 'fs'
|
||||
import { convert, gotenberg, office, pipe, please } from '../src'
|
||||
import { convert, gotenberg, office, pipe, please } from '../../src'
|
||||
|
||||
// need to run Gotenberg like this
|
||||
// docker run --rm -p 3500:3000 thecodingmachine/gotenberg:6
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Request, RequestType } from './_types'
|
||||
import { markdown } from './markdown'
|
||||
import { markdown, Request, RequestType } from '../src'
|
||||
|
||||
// dumb object to test purity
|
||||
const dumb = { type: RequestType.Undefined, url: 'test', fields: {} }
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Request, RequestType } from './_types'
|
||||
import { merge } from './merge'
|
||||
import { merge, Request, RequestType } from '../src'
|
||||
|
||||
// dumb object to test purity
|
||||
const dumb: Request = {
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Request, RequestType } from './_types'
|
||||
import { office } from './office'
|
||||
import { office, Request, RequestType } from '../src'
|
||||
|
||||
// dumb object to test purity
|
||||
const dumb = { type: RequestType.Undefined, url: 'test', fields: {} }
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Request, RequestType } from './_types'
|
||||
import { ping } from './ping'
|
||||
import { ping, Request, RequestType } from '../src'
|
||||
|
||||
// dumb object to test purity
|
||||
const dumb = { type: RequestType.Undefined, url: 'test', fields: {} }
|
||||
Binary file not shown.
@@ -1,12 +1,4 @@
|
||||
import {
|
||||
delay,
|
||||
filename,
|
||||
googleChromeRpccBufferSize,
|
||||
range,
|
||||
scale,
|
||||
timeout,
|
||||
webhook,
|
||||
} from './set-helpers'
|
||||
import { delay, filename, googleChromeRpccBufferSize, range, scale, timeout, webhook } from '../src'
|
||||
|
||||
test('Test `filename` function', () => {
|
||||
const object = {}
|
||||
@@ -1,6 +1,4 @@
|
||||
import { Request, RequestType } from './_types'
|
||||
import { set } from './set'
|
||||
import { delay, filename } from './set-helpers'
|
||||
import { delay, filename, Request, RequestType, set } from '../src'
|
||||
|
||||
// dumb object to test purity
|
||||
const dumb: Request = {
|
||||
Binary file not shown.
@@ -1,31 +1,29 @@
|
||||
import {
|
||||
a3,
|
||||
A3,
|
||||
a4,
|
||||
A4,
|
||||
a5,
|
||||
A5,
|
||||
a6,
|
||||
A6,
|
||||
landscape,
|
||||
largeMargins,
|
||||
LARGE_MARGINS,
|
||||
legal,
|
||||
LEGAL,
|
||||
letter,
|
||||
LETTER,
|
||||
marginSizes,
|
||||
noMargins,
|
||||
normalMargins,
|
||||
NORMAL_MARGINS,
|
||||
NO_MARGINS,
|
||||
paperSize,
|
||||
portrait,
|
||||
tabloid,
|
||||
} from './to-helpers'
|
||||
import {
|
||||
A3,
|
||||
A4,
|
||||
A5,
|
||||
A6,
|
||||
LARGE_MARGINS,
|
||||
LEGAL,
|
||||
LETTER,
|
||||
NORMAL_MARGINS,
|
||||
NO_MARGINS,
|
||||
TABLOID,
|
||||
} from './page'
|
||||
} from '../src'
|
||||
|
||||
test('Test `landscape` function', () => {
|
||||
const object = {}
|
||||
@@ -1,7 +1,4 @@
|
||||
import { HtmlRequest, RequestType } from './_types'
|
||||
import { to } from './to'
|
||||
import { a4, landscape, noMargins } from './to-helpers'
|
||||
import { A4, NO_MARGINS } from './page'
|
||||
import { a4, A4, HtmlRequest, landscape, noMargins, NO_MARGINS, RequestType, to } from '../src'
|
||||
|
||||
// dumb object to test purity
|
||||
const dumb: HtmlRequest = {
|
||||
@@ -1,5 +1,4 @@
|
||||
import { Request, RequestType } from './_types'
|
||||
import { url } from './url'
|
||||
import { Request, RequestType, url } from '../src'
|
||||
|
||||
// dumb object to test purity
|
||||
const dumb: Request = {
|
||||
+1
-1
@@ -14,5 +14,5 @@
|
||||
"baseUrl": "./src"
|
||||
},
|
||||
"include": ["src/**/*"],
|
||||
"exclude": ["node_modules", "**/*.spec.ts"]
|
||||
"exclude": ["**/*.spec.ts"]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user