Skip to content

Commit

Permalink
fix(package): revert recent client file change (#819)
Browse files Browse the repository at this point in the history
this subtly broke some setups that we didn't have tests for
  • Loading branch information
stainless-bot authored May 3, 2024
1 parent d63f22c commit fa722c9
Show file tree
Hide file tree
Showing 6 changed files with 560 additions and 298 deletions.
4 changes: 4 additions & 0 deletions ecosystem-tests/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ const projectRunners = {
'node-ts-esm': defaultNodeRunner,
'node-ts-esm-web': defaultNodeRunner,
'node-ts-esm-auto': defaultNodeRunner,
'node-js': async () => {
await installPackage();
await run('node', ['test.js']);
},
'ts-browser-webpack': async () => {
await installPackage();

Expand Down
244 changes: 244 additions & 0 deletions ecosystem-tests/node-js/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions ecosystem-tests/node-js/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"name": "node-js",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
"dependencies": {
"openai": "^4.40.1"
}
}
8 changes: 8 additions & 0 deletions ecosystem-tests/node-js/test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const openaiKey = "a valid OpenAI key"
const OpenAI = require('openai');

console.log(OpenAI)

const openai = new OpenAI({
apiKey: openaiKey,
});
Loading

0 comments on commit fa722c9

Please sign in to comment.