Skip to content

Commit

Permalink
test: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
joscha committed Jul 29, 2024
1 parent ebd27bb commit 72b1e58
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 18 deletions.
4 changes: 3 additions & 1 deletion deno.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions scripts/build_npm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,15 @@ await build({
declaration: 'separate',
outDir: './npm',
importMap: 'deno.jsonc',
skipNpmInstall: true,
skipNpmInstall: false,
skipSourceOutput: true,
// due to: https://github.com/denoland/dnt/issues/254 tests are disabled for now
test: false,
scriptModule: false,
shims: {
// see JS docs for overview and more options
deno: true,
deno: false,
undici: true,
},
rootTestDir: './src/v1/tests',
filterDiagnostic(diagnostic: ts.Diagnostic) {
Expand Down
26 changes: 12 additions & 14 deletions src/v1/entity_files.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
import { assert } from '@std/assert'
import type { AxiosInstance } from 'axios'
import type { Readable } from 'node:stream'
import { defaultTransformers } from './axios_default_transformers.ts'
import { FieldBase } from './fields.ts'
import { FieldValueType } from './lists.ts'
import type { DateTime, Replace, RequireOnlyOne } from './types.ts'
import { entityFilesUrl, fieldsUrl } from './urls.ts'
import { createSearchIteratorFn } from './create_search_iterator_fn.ts'
import { EntityRequestFilter } from './field_value_changes.ts'
import type { PagedRequest } from './paged_request.ts'
import type { PagedResponse } from './paged_response.ts'
import type { DateTime, Replace, RequireOnlyOne } from './types.ts'
import { entityFilesUrl } from './urls.ts'
export type { DateTime } from './types.ts'
import { Readable } from 'node:stream'
import { EntityRequestFilter } from './field_value_changes.ts'
import { assert } from '@std/assert'
import { createSearchIteratorFn } from './create_search_iterator_fn.ts'

type EntityFileRaw = {
export type EntityFileRaw = {
/** The unique identifier of the entity file object. */
id: number
/** The name of the file. */
name: string
/** The size of the file in bytes. */
size: string
size: number
/** The unique identifier of the person corresponding to the entity file. */
person_id: number | null
/** The unique identifier of the organization corresponding to the entity file. */
Expand All @@ -31,7 +29,7 @@ type EntityFileRaw = {
created_at: DateTime
}

type EntityFile = Replace<EntityFileRaw, {
export type EntityFile = Replace<EntityFileRaw, {
created_at: Date
}>

Expand All @@ -55,17 +53,17 @@ export type AllEntityFileRequest =
}
& PagedRequest

type PagedEntityFileResponseRaw =
export type PagedEntityFileResponseRaw =
& {
entity_files: EntityFileRaw[]
}
& PagedResponse

type PagedEntityFileResponse = Replace<PagedEntityFileResponseRaw, {
export type PagedEntityFileResponse = Replace<PagedEntityFileResponseRaw, {
entity_files: EntityFile[]
}>

type UploadEntityFileRequest =
export type UploadEntityFileRequest =
& {
files: File[]
}
Expand Down
4 changes: 3 additions & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@

/* Language and Environment */
"target": "es2020", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
"lib": [
"DOM"
], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
// "jsx": "preserve", /* Specify what JSX code is generated. */
// "experimentalDecorators": true, /* Enable experimental support for legacy experimental decorators. */
// "emitDecoratorMetadata": true, /* Emit design-type metadata for decorated declarations in source files. */
Expand Down

0 comments on commit 72b1e58

Please sign in to comment.