Skip to content

Compiler error after update to v2.0.0 #136

Closed
@JarnoRFB

Description

@JarnoRFB

Version info

firebase-functions-test: 2.0.0

firebase-functions: 3.20.1

firebase-admin: 10.1.0

Test case

import firebaseFunctionTest from "firebase-functions-test";

const projectId = "demo-afc";
const test = firebaseFunctionTest({
  projectId,
  storageBucket: "test",
  databaseURL: "http://localhost:9000/?ns=demo-afc",
});
    "test:unit": "mocha -r ts-node/register --timeout 10000 --exit src/**/*.test.ts $npm_config_mocha_opts",
    "test": "tsc && npx firebase -P demo-afc emulators:exec --only firestore,database,auth,storage \"npm run test:unit\"",

Steps to reproduce

Run npm run test

Expected behavior

The program compiles and executes the tests.

Actual behavior

node_modules/firebase-functions-test/lib/main.d.ts:5:138 - error TS2305: Module '"./v1"' has no exported member '_makeResourceName'.

5 export { ContextOptions, EventContextOptions, WrappedFunction, WrappedScheduledFunction, CallableContextOptions, makeChange, mockConfig, _makeResourceName, _extractParams, } from './v1';
                                                                                                                                           ~~~~~~~~~~~~~~~~~

node_modules/firebase-functions-test/lib/main.d.ts:5:157 - error TS2305: Module '"./v1"' has no exported member '_extractParams'.

5 export { ContextOptions, EventContextOptions, WrappedFunction, WrappedScheduledFunction, CallableContextOptions, makeChange, mockConfig, _makeResourceName, _extractParams, } from './v1';

The typescript compiler fails due to a type error. I can see that _extractParams and _makeResourceName are exported in v1.js, but are missing from the exports in v1.d.ts.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions