Skip to content

Commit

Permalink
test: import from e2e, nuxt 4 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
Yizack committed Jul 21, 2024
1 parent d332e04 commit 3a252d4
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 14 deletions.
5 changes: 5 additions & 0 deletions test/fixtures/basic/app/app.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<template>
<div>
<NuxtPage />
</div>
</template>
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
<template>
<div>Nuxt Webhook Validators</div>
</template>

<script setup>
</script>
6 changes: 3 additions & 3 deletions test/fixtures/basic/nuxt.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { defineNuxtConfig } from 'nuxt/config'
import myModule from '../../../src/module'

export default defineNuxtConfig({
modules: [
'../../../src/module',
],
future: { compatibilityVersion: 4 },
modules: [myModule],
serverDir: '../../../playground/server',
runtimeConfig: {
webhook: {
Expand Down
2 changes: 1 addition & 1 deletion test/module.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { fileURLToPath } from 'node:url'
import { describe, it, expect } from 'vitest'
import { $fetch, setup } from '@nuxt/test-utils'
import { $fetch, setup } from '@nuxt/test-utils/e2e'
import * as events from './events'

const validWebhook = { isValidWebhook: true }
Expand Down
2 changes: 1 addition & 1 deletion test/simulations/discord.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { subtle } from 'node:crypto'
import { $fetch } from '@nuxt/test-utils'
import { $fetch } from '@nuxt/test-utils/e2e'
import { encoder, ed25519Algorithm } from '../../src/runtime/server/lib/helpers'

const body = { type: 0, data: 'testBody' }
Expand Down
2 changes: 1 addition & 1 deletion test/simulations/github.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { subtle } from 'node:crypto'
import { Buffer } from 'node:buffer'
import { $fetch } from '@nuxt/test-utils'
import { $fetch } from '@nuxt/test-utils/e2e'
import { encoder, hmacAlgorithm } from '../../src/runtime/server/lib/helpers'
import nuxtConfig from '../fixtures/basic/nuxt.config'

Expand Down
2 changes: 1 addition & 1 deletion test/simulations/heroku.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { subtle } from 'node:crypto'
import { Buffer } from 'node:buffer'
import { $fetch } from '@nuxt/test-utils'
import { $fetch } from '@nuxt/test-utils/e2e'
import { encoder, hmacAlgorithm } from '../../src/runtime/server/lib/helpers'
import nuxtConfig from '../fixtures/basic/nuxt.config'

Expand Down
2 changes: 1 addition & 1 deletion test/simulations/nuxthub.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { sha256 } from 'ohash'
import { $fetch } from '@nuxt/test-utils'
import { $fetch } from '@nuxt/test-utils/e2e'
import nuxtConfig from '../fixtures/basic/nuxt.config'

const body = 'testBody'
Expand Down
2 changes: 1 addition & 1 deletion test/simulations/paddle.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { subtle } from 'node:crypto'
import { $fetch } from '@nuxt/test-utils'
import { $fetch } from '@nuxt/test-utils/e2e'
import { encoder, hmacAlgorithm } from '../../src/runtime/server/lib/helpers'
import nuxtConfig from '../fixtures/basic/nuxt.config'

Expand Down
2 changes: 1 addition & 1 deletion test/simulations/stripe.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { subtle } from 'node:crypto'
import { Buffer } from 'node:buffer'
import { $fetch } from '@nuxt/test-utils'
import { $fetch } from '@nuxt/test-utils/e2e'
import { encoder, hmacAlgorithm } from '../../src/runtime/server/lib/helpers'
import nuxtConfig from '../fixtures/basic/nuxt.config'

Expand Down
2 changes: 1 addition & 1 deletion test/simulations/twitch.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { subtle } from 'node:crypto'
import { Buffer } from 'node:buffer'
import { $fetch } from '@nuxt/test-utils'
import { $fetch } from '@nuxt/test-utils/e2e'
import { encoder, hmacAlgorithm } from '../../src/runtime/server/lib/helpers'
import nuxtConfig from '../fixtures/basic/nuxt.config'

Expand Down

0 comments on commit 3a252d4

Please sign in to comment.