feat: adding test

pull/2/head
crazywoola 3 years ago
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 = { const routes = {
application: { application: {
@ -31,7 +32,6 @@ const routes = {
method: 'PATCH', method: 'PATCH',
url: (conversationId) => `/conversations/${conversationId}`, url: (conversationId) => `/conversations/${conversationId}`,
} }
} }
export class LangGeniusClient { export class LangGeniusClient {

@ -14,7 +14,16 @@
"<crazywoola> <<427733928@qq.com>> (https://github.com/crazywoola)" "<crazywoola> <<427733928@qq.com>> (https://github.com/crazywoola)"
], ],
"license": "MIT", "license": "MIT",
"scripts": {
"test": "jest"
},
"dependencies": { "dependencies": {
"axios": "^1.3.5" "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…
Cancel
Save