Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions .github/PULL_REQUEST_TEMPLATE.md

This file was deleted.

37 changes: 28 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,35 @@ name: CI
on:
push:
branches: [ master ]

pull_request:
branches: [ master ]

workflow_dispatch: {}

jobs:
Job:
name: Node.js
uses: artusjs/github-actions/.github/workflows/node-test.yml@master
with:
os: 'ubuntu-latest'
version: '14, 16, 18'
test:
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'macos-latest']
node: ['20', '22', '24']

name: Test (${{ matrix.os }}, node@${{ matrix.node }})
runs-on: ${{ matrix.os }}

concurrency:
group: test-${{ github.workflow }}-#${{ github.event.pull_request.number || github.head_ref || github.ref }}-(${{ matrix.os }}, ${{ matrix.node }})
cancel-in-progress: true

steps:
- name: Checkout repository
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5

- name: Set up Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6
with:
node-version: ${{ matrix.node }}

- name: Install dependencies
run: npm i -g npminstall && npminstall

- name: Test
run: npm run ci
18 changes: 4 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
# Examples for [egg](https://github.com/eggjs/egg)

---

[![build status][travis-image]][travis-url]
[![CI](https://github.com/eggjs/examples/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/eggjs/examples/actions/workflows/ci.yml)
[![node version][node-image]][node-url]
[![egg version][egg-image]][egg-url]

[travis-image]: https://img.shields.io/travis/eggjs/examples.svg?style=flat-square
[travis-url]: https://travis-ci.org/eggjs/examples
[node-image]: https://img.shields.io/badge/node.js-%3E=_8-green.svg?style=flat-square
[node-image]: https://img.shields.io/badge/node.js-%3E=_20-green.svg?style=flat-square
[node-url]: http://nodejs.org/download/
[egg-image]: https://img.shields.io/badge/egg-%3E=_1-green.svg?style=flat-square
[egg-image]: https://img.shields.io/badge/egg-%3E=_4-green.svg?style=flat-square
[egg-url]: https://github.com/eggjs/egg

## Usage
Expand All @@ -23,7 +19,7 @@ $ npm install
$ npm run dev
```

**Recommend to use Node >= 8**
**Recommend to use Node >= 20**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Convert emphasis to proper heading to resolve markdown lint warning.

The line uses bold emphasis instead of a proper heading structure, which triggers MD036 from markdownlint-cli2.

Apply this diff:

-**Recommend to use Node >= 20**
+## Recommend to use Node >= 20
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
**Recommend to use Node >= 20**
## Recommend to use Node >= 20
🧰 Tools
🪛 markdownlint-cli2 (0.18.1)

22-22: Emphasis used instead of a heading

(MD036, no-emphasis-as-heading)

🤖 Prompt for AI Agents
In README.md around line 22, the line currently uses bold emphasis ("**Recommend
to use Node >= 20**") which triggers markdownlint MD036; replace the bold text
with a proper markdown heading (e.g., prepend one or two # characters like "#
Recommend to use Node >= 20" or "## Recommend to use Node >= 20" to match
surrounding heading levels), remove the surrounding ** markers, and ensure a
single blank line before and after the new heading for proper formatting.


## List of examples

Expand Down Expand Up @@ -64,12 +60,6 @@ You can use `--verbose` to show more infomation
$ npm test -- --verbose
```

### Generate dependencies

```bash
$ npm run autod
```

### Show list of examples

```bash
Expand Down
17 changes: 17 additions & 0 deletions bin/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

set -eux -o pipefail

test() {
echo "Test $1"
cd "$1"
pwd
rm -rf node_modules package-lock.json
npmupdate -c
npm run ci
cd ..
Comment on lines +11 to +12
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Add error handling for npm commands.

The script currently doesn't preserve exit codes from the npm commands. If npm run ci fails, the script will still continue to the next test. This could hide test failures.

- npm run ci
- cd ..
+ if ! npm run ci; then
+   echo "Tests failed in $1"
+   cd ..
+   return 1
+ fi
+ cd ..
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
npm run ci
cd ..
if ! npm run ci; then
echo "Tests failed in $1"
cd ..
return 1
fi
cd ..

}

test body-parser-example
test helloworld
test hello-tegg
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
'use strict';

const Controller = require('egg').Controller;
const { Controller } = require('egg');
const { xml2js } = require('xml-js');

class HomeController extends Controller {
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
'use strict';

exports.keys = '123456';

exports.bodyParser = {
Expand Down
10 changes: 5 additions & 5 deletions bodyParser/package.json → body-parser-example/package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"name": "bodyParser",
"name": "body-parser-example",
"version": "1.0.0",
"dependencies": {
"egg": "^2",
"egg": "beta",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Avoid loose "beta" version tags; pin to specific beta releases.

Using "beta" as a version spec is too permissive and may introduce non-deterministic installs. Different CI runs or developer machines could resolve to different beta patch versions, breaking reproducibility. Since this is an example repo migrating to egg v4 (beta), pin to specific versions or use a narrower semver range.

Apply this diff to pin specific beta versions:

  "dependencies": {
-   "egg": "beta",
+   "egg": "^4.0.0-beta",
    "xml-js": "^1.6.9"
  },
  "devDependencies": {
-   "@eggjs/bin": "beta",
-   "@eggjs/mock": "beta"
+   "@eggjs/bin": "^4.0.0-beta",
+   "@eggjs/mock": "^4.0.0-beta"
  },

Alternatively, inspect the eggjs org releases to find the latest stable beta tag (e.g., 4.0.0-beta.5) and pin those specific versions.

Also applies to: 9-10


I'll verify the review comment by examining the package.json file and checking the available beta versions from the eggjs organization.

import json

# Try to parse package.json if accessible
try:
    with open("body-parser-example/package.json", "r") as f:
        data = json.load(f)
        print("Dependencies:")
        if "dependencies" in data:
            for dep, version in data.get("dependencies", {}).items():
                if "egg" in dep.lower():
                    print(f"  {dep}: {version}")
        print("\nDevDependencies:")
        if "devDependencies" in data:
            for dep, version in data.get("devDependencies", {}).items():
                if "egg" in dep.lower() or "eggjs" in dep.lower():
                    print(f"  {dep}: {version}")
except Exception as e:
    print(f"Error: {e}")



🏁 Script executed:

#!/bin/bash
# Inspect the package.json file to verify current state
if [ -f "body-parser-example/package.json" ]; then
  cat body-parser-example/package.json
else
  echo "File not found"
fi

Length of output: 321


🏁 Script executed:

#!/bin/bash
# Search for egg, @eggjs/bin, and @eggjs/mock version references
rg -n '"egg"|"@eggjs/bin"|"@eggjs/mock"' body-parser-example/package.json -A 0 -B 0

Length of output: 77


🏁 Script executed:

#!/bin/bash
# Check if there are any other package.json files that might reference these packages
fd 'package.json' --exec grep -l "egg\|@eggjs" {} \;

Length of output: 1277


🌐 Web query:

egg v4 beta versions npm registry eggjs

💡 Result:

You can find Egg v4 beta releases on the npm registry and install them either by the beta version tag or the next dist-tag.

Quick options:

  • Install the latest beta via dist-tag: npm i egg@next. [1][2]
  • Install a specific beta (example): npm i [email protected]. [3][2]

References:

  1. egg package (npm) — versions and dist-tags. [https://www.npmjs.com/package/egg]. [1]
  2. egg v4 release notes / dist-tag mentions (v4.0.x / @next). [newreleases / eggjs/egg]. [2]
  3. Example prerelease listing showing v4.1.0-beta.* and published beta packages. [3]

🌐 Web query:

@eggjs/bin @eggjs/mock latest beta versions

💡 Result:

  • @eggjs/bin — latest beta: 7.3.1-beta.6. [1][2]
  • @eggjs/mock — latest beta: 6.1.0-beta.8. [1][3]

Sources:
[1] Release listing for egg v4.1.0 prereleases (shows published prerelease package versions).
[2] @eggjs/bin npm page (stable/latest info).
[3] @eggjs/mock package/version listing.


Pin specific beta versions instead of loose "beta" dist-tag for reproducibility.

Using "beta" as a version specifier is a floating dist-tag that will resolve to different versions as new beta releases are published. This breaks reproducibility—installations at different times will pull different beta patch versions, complicating debugging and testing. Since the eggjs org has published specific beta versions (e.g., egg 4.1.0-beta.13, @eggjs/bin 7.3.1-beta.6, @eggjs/mock 6.1.0-beta.8), pin to a specific beta release instead.

Apply this diff:

  "dependencies": {
-   "egg": "beta",
+   "egg": "^4.0.0-beta",
    "xml-js": "^1.6.9"
  },
  "devDependencies": {
-   "@eggjs/bin": "beta",
-   "@eggjs/mock": "beta"
+   "@eggjs/bin": "^4.0.0-beta",
+   "@eggjs/mock": "^4.0.0-beta"
  },

Alternatively, pin exact versions (e.g., "egg": "4.0.0-beta.13") if you need strict reproducibility across all installs.

Also applies to: lines 9–10

🤖 Prompt for AI Agents
In body-parser-example/package.json around line 5 (and also update lines 9–10),
the dependency version "beta" is a floating dist-tag causing non-reproducible
installs; replace the loose "beta" specifier with a concrete beta release (for
example "4.1.0-beta.13" for egg or the exact beta versions published by the
eggjs org) so installs resolve to a fixed package version—update the other beta
entries on lines 9–10 to their corresponding specific beta versions as well to
ensure reproducibility.

"xml-js": "^1.6.9"
},
"devDependencies": {
"egg-bin": "^4.3.5",
"egg-mock": "^3.13.1"
"@eggjs/bin": "beta",
"@eggjs/mock": "beta"
},
"scripts": {
"dev": "egg-bin dev",
"test": "egg-bin test",
"cov": "egg-bin cov"
"ci": "egg-bin cov"
},
"private": true
}
Comment on lines 1 to 18
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Add Node.js engine constraint to enforce minimum version.

Per the PR objectives, egg v4 requires Node.js >= 18.19.0. Add an "engines" field to package.json to enforce this constraint for developers and CI environments.

Apply this diff to add the engines field:

  "scripts": {
    "dev": "egg-bin dev",
    "test": "egg-bin test",
    "ci": "egg-bin cov"
  },
+ "engines": {
+   "node": ">=18.19.0"
+ },
  "private": true

Based on learnings about egg v4 migration requirements.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
{
"name": "bodyParser",
"name": "body-parser-example",
"version": "1.0.0",
"dependencies": {
"egg": "^2",
"egg": "beta",
"xml-js": "^1.6.9"
},
"devDependencies": {
"egg-bin": "^4.3.5",
"egg-mock": "^3.13.1"
"@eggjs/bin": "beta",
"@eggjs/mock": "beta"
},
"scripts": {
"dev": "egg-bin dev",
"test": "egg-bin test",
"cov": "egg-bin cov"
"ci": "egg-bin cov"
},
"private": true
}
{
"name": "body-parser-example",
"version": "1.0.0",
"dependencies": {
"egg": "beta",
"xml-js": "^1.6.9"
},
"devDependencies": {
"@eggjs/bin": "beta",
"@eggjs/mock": "beta"
},
"scripts": {
"dev": "egg-bin dev",
"test": "egg-bin test",
"ci": "egg-bin cov"
},
"engines": {
"node": ">=18.19.0"
},
"private": true
}
🤖 Prompt for AI Agents
In body-parser-example/package.json around lines 1 to 18, add an "engines" field
to enforce Node.js >=18.19.0 required by egg v4; update the top-level JSON to
include "engines": { "node": ">=18.19.0" } so CI and developers are constrained
to the minimum Node version (ensure valid JSON comma placement after the
"version" or before "dependencies").

Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
'use strict';

const { app } = require('egg-mock/bootstrap');

describe('test/app/controller/home.test.js', () => {
const { app } = require('@eggjs/mock/bootstrap');

describe('test/home.test.js', () => {
beforeEach(() => app.mockCsrf());

it('should parse form', () => {
Expand Down
1 change: 1 addition & 0 deletions hello-tegg/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ test/**/*.map
config/**/*.map
*.d.ts
*.tsbuildinfo
.egg/
3 changes: 2 additions & 1 deletion hello-tegg/app/biz/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,6 @@
"name": "biz-module",
"eggModule": {
"name": "biz"
}
},
"type": "module"
}
9 changes: 5 additions & 4 deletions hello-tegg/app/controller/HelloController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ import {
HTTPMethod,
HTTPMethodEnum,
Context,
EggContext,
type EggContext,
HTTPQuery,
Middleware,
Inject,
} from '@eggjs/tegg';
import { EggLogger } from 'egg';
import { traceMethod } from 'app/middleware/trace_method';
import { HelloService } from 'app/biz/HelloService';
import type { EggLogger } from 'egg';

import { traceMethod } from '../middleware/trace_method.ts';
import { HelloService } from '../biz/HelloService.ts';

@HTTPController()
@Middleware(traceMethod)
Expand Down
2 changes: 1 addition & 1 deletion hello-tegg/app/middleware/trace_method.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { EggContext, Next } from '@eggjs/tegg';
import type { EggContext, Next } from '@eggjs/tegg';

export async function traceMethod(ctx: EggContext, next: Next) {
await next();
Expand Down
16 changes: 7 additions & 9 deletions hello-tegg/config/config.default.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import { EggAppConfig, PowerPartial } from 'egg';
import { defineConfigFactory } from 'egg';

export default (appInfo: EggAppConfig) => {
const config = {} as PowerPartial<EggAppConfig>;

// override config from framework / plugin
config.keys = appInfo.name + '123456';

return config;
};
export default defineConfigFactory(appInfo => {
return {
// override config from framework / plugin
keys: appInfo.name + '123456',
};
});
2 changes: 1 addition & 1 deletion hello-tegg/config/plugin.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { EggPlugin } from 'egg';
import type { EggPlugin } from 'egg';

const plugin: EggPlugin = {
tegg: {
Expand Down
53 changes: 29 additions & 24 deletions hello-tegg/package.json
Original file line number Diff line number Diff line change
@@ -1,41 +1,46 @@
{
"name": "hello-tegg",
"private": true,
"type": "module",
"description": "tegg application example",
"scripts": {
"start": "egg-scripts start",
"stop": "egg-scripts stop",
"start": "eggctl start --daemon",
"stop": "eggctl stop",
"dev": "egg-bin dev",
"debug": "egg-bin debug",
"test-local": "egg-bin test",
"test": "npm run lint -- --fix && npm run test-local",
"cov": "egg-bin cov",
"tsc": "tsc -p tsconfig.json",
"ci": "npm run lint && npm run cov && npm run tsc",
"pretest": "npm run clean && npm run lint -- --fix",
"test": "egg-bin test",
"tsc": "tsc -p tsconfig.prod.json",
"preci": "npm run clean && npm run lint",
"ci": "egg-bin cov",
"postci": "npm run tsc && npm run clean",
"lint": "eslint .",
"clean": "tsc -b --clean"
"clean": "tsc -b --clean",
"prepublishOnly": "npm run clean && tsc"
},
"egg": {
"typescript": true
},
"license": "MIT",
"dependencies": {
"@eggjs/tegg": "^3.2.1",
"@eggjs/tegg-controller-plugin": "^3.2.1",
"@eggjs/tegg-plugin": "^3.2.1",
"@eggjs/tsconfig": "^1.2.0",
"@eggjs/tegg-config": "^3.1.0",
"egg": "^3.9.1",
"egg-scripts": "^2.17.0"
"@eggjs/scripts": "beta",
"@eggjs/tegg": "beta",
"@eggjs/tegg-config": "beta",
"@eggjs/tegg-controller-plugin": "beta",
"@eggjs/tegg-plugin": "beta",
"egg": "beta"
Comment on lines +25 to +30
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Pin specific beta versions to avoid breaking changes.

Using the "beta" tag for dependencies means the package will resolve to the latest beta version at install time, which can introduce breaking changes unexpectedly between installs. This can lead to inconsistent behavior across different environments and makes builds non-reproducible.

Consider pinning to specific beta versions. Run this script to check the current beta versions available:

Also applies to: 35-37


🏁 Script executed:

#!/bin/bash
# Description: Check latest beta versions for @eggjs packages

echo "Checking beta versions for @eggjs packages..."
for pkg in "@eggjs/scripts" "@eggjs/tegg" "@eggjs/tegg-config" "@eggjs/tegg-controller-plugin" "@eggjs/tegg-plugin" "egg" "@eggjs/tsconfig" "@eggjs/bin" "@eggjs/mock"; do
  echo "=== $pkg ==="
  npm view "$pkg" dist-tags.beta versions --json | jq -r 'if type == "array" then .[-5:] else . end'
done

Length of output: 16364


Pin specific beta versions to avoid non-reproducible builds.

Using "beta" as a version specifier resolves to the latest beta version at install time. This creates the reproducibility issues you've identified. The npm registry data confirms multiple beta versions are available for each package—installing at different times would pull different versions without a lock file.

Recommended pinned versions based on current latest betas:

  • "@eggjs/scripts": "5.0.0-beta.28"
  • "@eggjs/tegg": "4.0.0-beta.11"
  • "@eggjs/tegg-config": "4.0.0-beta.11"
  • "@eggjs/tegg-controller-plugin": "4.0.0-beta.11"
  • "@eggjs/tegg-plugin": "4.0.0-beta.11"
  • "egg": "4.1.0-beta.28"

Apply the same approach to the dependencies at lines 35-37.

🤖 Prompt for AI Agents
In hello-tegg/package.json around lines 25 to 30 (and apply same change to the
related dependencies at lines 35-37), the packages use the loose "beta" tag
which yields non-reproducible installs; replace each "beta" specifier with the
pinned beta versions provided by the reviewer: set "@eggjs/scripts" to
"5.0.0-beta.28", "@eggjs/tegg" to "4.0.0-beta.11", "@eggjs/tegg-config" to
"4.0.0-beta.11", "@eggjs/tegg-controller-plugin" to "4.0.0-beta.11",
"@eggjs/tegg-plugin" to "4.0.0-beta.11", and "egg" to "4.1.0-beta.28", and make
the same pinning for the matching entries at lines 35-37 to ensure reproducible
builds.

},
"devDependencies": {
"@types/mocha": "^10.0.1",
"@types/node": "^16.18.10",
"egg-bin": "^6.0.0",
"egg-mock": "^5.4.0",
"eslint": "^8.30.0",
"eslint-config-egg": "^12.1.0",
"typescript": "^4.9.4"
"@types/mocha": "10",
"@types/node": "22",
"@eggjs/tsconfig": "beta",
"@eggjs/bin": "beta",
"@eggjs/mock": "beta",
"eslint": "8",
"eslint-config-egg": "14",
"typescript": "5"
},
"repository": "[email protected]:eggjs/examples.git"
"repository": "[email protected]:eggjs/examples.git",
"engines": {
"node": ">=20.0.0"
}
Comment on lines +43 to +45
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Node.js version requirement mismatch with PR description.

The PR description states "drop Node.js < 18.19.0 support," but this package requires >=20.0.0. This inconsistency may cause confusion. Additionally, the helloworld package doesn't specify an engines field at all.

Please clarify:

  • Is the minimum Node.js version 18.19.0 or 20.0.0?
  • Should all example packages have consistent engine requirements?
🤖 Prompt for AI Agents
In hello-tegg/package.json around lines 43-45 the "engines" field requires
"node": ">=20.0.0" which conflicts with the PR description that drops Node.js
<18.19.0; decide the project-wide minimum (either 18.19.0 or 20.0.0), update
this package.json to use "node": ">=<chosen_version>", add the same "engines"
entry to the helloworld package.json to keep examples consistent, and update the
PR description to state the chosen minimum Node.js version so they match.

}
20 changes: 7 additions & 13 deletions hello-tegg/test/biz/HelloService.test.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,17 @@
import { Context } from 'egg';
import assert from 'assert';
import { app } from 'egg-mock/bootstrap';
import { HelloService } from '../../app/biz/HelloService';
import assert from 'node:assert/strict';
import { app } from '@eggjs/mock/bootstrap';

import { HelloService } from '../../app/biz/HelloService.ts';

describe('test/biz/HelloService.test.ts', () => {
let ctx: Context;
let helloService: HelloService;

beforeEach(async () => {
ctx = await app.mockModuleContext();
helloService = await ctx.getEggObject(HelloService);
});

afterEach(async () => {
await app.destroyModuleContext(ctx);
before(async () => {
helloService = await app.getEggObject(HelloService);
});

it('should work', async () => {
const msg = await helloService.hello('killa');
assert(msg === 'hello, killa');
assert.equal(msg, 'hello, killa');
});
});
23 changes: 11 additions & 12 deletions hello-tegg/test/controller/HelloController.test.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
import { app } from 'egg-mock/bootstrap';
import assert from 'assert';
import assert from 'node:assert/strict';

import { app } from '@eggjs/mock/bootstrap';

describe('test/controller/HelloController.test.ts', () => {
it('should work', async () => {
await app.httpRequest()
const res = await app.httpRequest()
.get('/hello?name=killa')
.expect(200)
.expect(res => {
assert.deepStrictEqual(res.body, {
success: true,
data: {
message: 'hello, killa (GET)',
},
});
});
.expect(200);
assert.deepEqual(res.body, {
success: true,
data: {
message: 'hello, killa (GET)',
},
});
});
});
6 changes: 4 additions & 2 deletions hello-tegg/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{
"extends": "@eggjs/tsconfig",
"compilerOptions": {
"baseUrl": "./"
}
"baseUrl": ".",
"declaration": false
},
"exclude": []
}
8 changes: 8 additions & 0 deletions hello-tegg/tsconfig.prod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "@eggjs/tsconfig",
"compilerOptions": {
"baseUrl": ".",
"declaration": false
},
"exclude": []
}
Loading