Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
nicola-smartive committed Aug 9, 2023
1 parent bf5f1a5 commit 8ea1d9c
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 15 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ jobs:
with:
node-version: ${{ matrix.version }}
- run: npm ci
- run: npm test
- run: npm run lint
- run: npm run test:unit
- run: npm run build

test_all:
if: ${{ always() }}
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
"lint": "eslint src",
"lint:fix": "eslint src --fix",
"deps": "docker-compose up",
"test": "npm run lint && npm run test:api && npm run build",
"test:api": "jest tests --no-cache --no-watchman",
"test": "npm run lint && npm run test:unit && npm run test:api && npm run build",
"test:unit": "jest tests/unit --no-cache --no-watchman",
"test:api": "jest tests/api --no-cache --no-watchman",
"generate-migration": "esbuild tests/utils/generate-migration.ts --bundle --platform=node --outdir=tmp --out-extension:.js=.cjs --format=cjs --packages=external && node tmp/generate-migration.cjs",
"clean": "del-cli dist/**",
"prebuild": "npm run clean",
Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions tests/query.spec.ts → tests/api/query.spec.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { gql } from '../src';
import { ANOTHER_ID, SOME_ID } from './utils/database/seed';
import { withServer } from './utils/server';
import { gql } from '../../src';
import { ANOTHER_ID, SOME_ID } from '../utils/database/seed';
import { withServer } from '../utils/server';

describe('query', () => {
it('can be executed', async () => {
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions tests/generate.spec.ts → tests/unit/generate.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { printSchemaFromModels } from '../src';
import { rawModels } from './utils/models';
import { printSchemaFromModels } from '../../src';
import { rawModels } from '../utils/models';

describe('generate', () => {
it('generates a schema', () => {
Expand Down
10 changes: 5 additions & 5 deletions tests/resolve.spec.ts → tests/unit/resolve.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import { makeExecutableSchema } from '@graphql-tools/schema';
import { execute, parse, Source } from 'graphql';
import knex from 'knex';
import { DateTime } from 'luxon';
import { gql } from '../src/client/gql';
import { Context } from '../src/context';
import { generate } from '../src/generate';
import { getResolvers } from '../src/resolvers';
import { models, permissions, rawModels } from './utils/models';
import { gql } from '../../src/client/gql';
import { Context } from '../../src/context';
import { generate } from '../../src/generate';
import { getResolvers } from '../../src/resolvers';
import { models, permissions, rawModels } from '../utils/models';

const test = async (operationName: string, query: string, variableValues: object, responses: unknown[]) => {
const knexInstance = knex({
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"include": ["./src/**/*.ts", "./src/**/*.tsx", "./tests/**/*.ts"],
"include": ["./src/**/*.ts", "./src/**/*.tsx"],
"exclude": ["node_modules", "dist"],
"compilerOptions": {
"outDir": "./dist/esm",
"rootDir": "./",
"rootDir": "./src",
"sourceMap": true,
"declaration": true,
"target": "esnext",
Expand Down

0 comments on commit 8ea1d9c

Please sign in to comment.