mirror of https://github.com/langgenius/dify.git
feat: adding test
This commit is contained in:
parent
2a68bfbc84
commit
c6cc1b43c7
|
|
@ -1,6 +1,7 @@
|
|||
import axios from 'axios'
|
||||
'use strict';
|
||||
const axios = require('axios');
|
||||
|
||||
const BASE_URL = 'https://api.dify.ai/v1'
|
||||
const BASE_URL = 'https://api.dify.ai/v1';
|
||||
|
||||
const routes = {
|
||||
application: {
|
||||
|
|
@ -31,7 +32,6 @@ const routes = {
|
|||
method: 'PATCH',
|
||||
url: (conversationId) => `/conversations/${conversationId}`,
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export class LangGeniusClient {
|
||||
|
|
|
|||
|
|
@ -14,7 +14,16 @@
|
|||
"<crazywoola> <<427733928@qq.com>> (https://github.com/crazywoola)"
|
||||
],
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"test": "jest"
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^1.3.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.21.8",
|
||||
"@babel/preset-env": "^7.21.5",
|
||||
"babel-jest": "^29.5.0",
|
||||
"jest": "^29.5.0"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
import { LangGeniusClient } from '../index';
|
||||
|
||||
describe('LangGeniusClient', () => {
|
||||
it('should be defined', async () => {
|
||||
const client = new LangGeniusClient('your-api-key');
|
||||
expect(client).toBeDefined();
|
||||
});
|
||||
});
|
||||
Loading…
Reference in New Issue