Skip to content

Commit 37703b5

Browse files
committed
refactor: move tetss outside
1 parent 0e0595a commit 37703b5

File tree

6 files changed

+22
-29
lines changed

6 files changed

+22
-29
lines changed

extensions/firestore-huggingface-inference-api/functions/src/inference.test.ts renamed to extensions/firestore-huggingface-inference-api/functions/__tests__/inference.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { HfInference, HfInferenceEndpoint } from '@huggingface/inference';
22
import { describe, expect, test } from '@jest/globals';
3-
import { runInference } from './inference';
4-
import { TaskId } from './tasks';
3+
import { runInference } from '../src/inference';
4+
import { TaskId } from '../src/tasks';
55

66
const inference = new HfInference('test');
77

extensions/firestore-huggingface-inference-api/functions/integration-tests/firebase.json

Lines changed: 0 additions & 14 deletions
This file was deleted.

extensions/firestore-huggingface-inference-api/functions/integration-tests/integration-test.spec.ts

Lines changed: 0 additions & 13 deletions
This file was deleted.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
const packageJson = require('./package.json');
2+
3+
module.exports = {
4+
name: packageJson.name,
5+
displayName: packageJson.name,
6+
rootDir: './',
7+
preset: 'ts-jest',
8+
testMatch: ['**/__tests__/*.test.ts'],
9+
testEnvironment: 'node',
10+
globalSetup: './jest.setup.js',
11+
globalTeardown: './jest.teardown.js',
12+
};
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = async function () {
2+
process.env = Object.assign(process.env, {
3+
LOCATION: 'europe-west2',
4+
});
5+
};
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = async function () {
2+
delete process.env.LOCATION;
3+
};

0 commit comments

Comments
 (0)