create-faas-app 8.0.0-beta.24 → 8.0.0-beta.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { dirname, join } from "node:path";
|
|
|
6
6
|
import { fileURLToPath } from "node:url";
|
|
7
7
|
import enquirer from "enquirer";
|
|
8
8
|
//#region package.json
|
|
9
|
-
var version = "8.0.0-beta.
|
|
9
|
+
var version = "8.0.0-beta.24";
|
|
10
10
|
//#endregion
|
|
11
11
|
//#region src/action.ts
|
|
12
12
|
const prompt = enquirer.prompt;
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { testApi } from '@faasjs/dev'
|
|
2
2
|
import { describe, it, expect } from 'vitest'
|
|
3
3
|
|
|
4
4
|
import api from '../hello.api'
|
|
5
5
|
|
|
6
6
|
describe('pages/home/api/hello', () => {
|
|
7
7
|
it('should work', async () => {
|
|
8
|
-
const
|
|
8
|
+
const handler = testApi(api)
|
|
9
9
|
|
|
10
|
-
const { statusCode, data } = await
|
|
10
|
+
const { statusCode, data } = await handler({ name: 'world' })
|
|
11
11
|
|
|
12
12
|
expect(statusCode).toEqual(200)
|
|
13
13
|
expect(data).toEqual({
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { testApi } from '@faasjs/dev'
|
|
2
2
|
import { describe, it, expect } from 'vitest'
|
|
3
3
|
|
|
4
4
|
import api from '../hello.api'
|
|
5
5
|
|
|
6
6
|
describe('pages/home/api/hello', () => {
|
|
7
7
|
it('should work', async () => {
|
|
8
|
-
const
|
|
8
|
+
const handler = testApi(api)
|
|
9
9
|
|
|
10
|
-
const { statusCode, data } = await
|
|
10
|
+
const { statusCode, data } = await handler({ name: 'world' })
|
|
11
11
|
|
|
12
12
|
expect(statusCode).toEqual(200)
|
|
13
13
|
expect(data).toEqual({
|