Skip to content

Commit

Permalink
fix: api client entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien-R44 committed Feb 26, 2024
1 parent 938f239 commit 15287fc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"peerDependencies": {
"@adonisjs/core": "^6.2.0",
"@adonisjs/session": "^7.0.0",
"@adonisjs/vite": "^2.0.2",
"@adonisjs/vite": "^3.0.0",
"@japa/api-client": "^2.0.0",
"edge.js": "^6.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions src/plugins/api_client.ts → src/plugins/japa/api_client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ import { configProvider } from '@adonisjs/core'
import { RuntimeException } from '@poppinss/utils'
import type { PluginFn } from '@japa/runner/types'
import { ApiRequest, ApiResponse } from '@japa/api-client'

import type { PageProps, ResolvedConfig } from '../types.js'
import type { ApplicationService } from '@adonisjs/core/types'

import type { PageProps, ResolvedConfig } from '../../types.js'

declare module '@japa/api-client' {
export interface ApiRequest {
/**
Expand Down
8 changes: 4 additions & 4 deletions tests_helpers/index.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import type { Test } from '@japa/runner/core'
import { pluginAdonisJS } from '@japa/plugin-adonisjs'
import { IncomingMessage, ServerResponse, createServer } from 'node:http'

import { getActiveTest } from '@japa/runner'
import { HttpContext } from '@adonisjs/core/http'
import { pluginAdonisJS } from '@japa/plugin-adonisjs'
import { ApiClient, apiClient } from '@japa/api-client'
import { ApplicationService } from '@adonisjs/core/types'
import { NamedReporterContract } from '@japa/runner/types'
import { runner, syncReporter } from '@japa/runner/factories'
import { inertiaApiClient } from '../src/plugins/api_client.js'
import { IncomingMessage, ServerResponse, createServer } from 'node:http'

import { inertiaApiClient } from '../src/plugins/japa/api_client.js'

export const BASE_URL = new URL('./tmp/', import.meta.url)

Expand Down

0 comments on commit 15287fc

Please sign in to comment.