提交 ce0968ec 编写于 作者: U u013235949

Wed Sep 4 17:05:00 CST 2024 inscode

上级 ca207a2f
run = "npm i && npm run dev" run = "npm i && npm run test"
language = "node"
[env] [env]
PATH = "/root/${PROJECT_DIR}/.config/npm/node_global/bin:/root/${PROJECT_DIR}/node_modules/.bin:${PATH}" PATH = "/root/${PROJECT_DIR}/.config/npm/node_global/bin:/root/${PROJECT_DIR}/node_modules/.bin:${PATH}"
XDG_CONFIG_HOME = "/root/.config" XDG_CONFIG_HOME = "/root/.config"
npm_config_prefix = "/root/${PROJECT_DIR}/.config/npm/node_global" npm_config_prefix = "/root/${PROJECT_DIR}/.config/npm/node_global"
\ No newline at end of file
[debugger]
program = "main.js"
module.exports = {
presets: [['@babel/preset-env', {targets: {node: 'current'}}]],
};
\ No newline at end of file
console.log("欢迎来到 InsCode");
\ No newline at end of file import {round} from 'lodash-es'
export function fixed(a) {
return round(a)
}
// const sum = require('./index')
import { fixed } from './index'
test('fixed 2', () => {
expect(fixed(2)).toBe(2.00);
});
\ No newline at end of file
...@@ -4,15 +4,21 @@ ...@@ -4,15 +4,21 @@
"description": "", "description": "",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"dev": "node index.js", "dev": "node index.js",
"test": "echo \"Error: no test specified\" && exit 1" "test": "jest"
}, },
"keywords": [], "keywords": [],
"author": "", "author": "",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"@types/node": "^18.0.6", "@types/node": "^18.0.6",
"node-fetch": "^3.2.6" "lodash-es": "^4.17.21",
"node-fetch": "^3.2.6"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@babel/preset-env": "^7.25.4",
"babel-jest": "^29.7.0",
"jest": "^29.7.0"
} }
} }
\ No newline at end of file
export const sum = (a, b) => {
return a + b
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册