- Took away
npm install --omit=optional
. It was not clear, whether it's beneficial after all. - Updated dependencies of both
sample
andpackage
.
- Made
npm install --omit=optional
flag compulsory insample
, to save resources. - Always using
127.0.0.1
instead oflocalhost
(Undici / Node.js built-in Fetch API only work that way).
- Moved wholly to Node 18; has build-in
fetch
API - FIXED:
sample/functions/package.json
does need to have@google-cloud/firestore
as a dependency.sample.dc
was broken, because of this.
- Dependency updates
- Jest
28.0.0
is out! π₯ππππ
- Updated to Jest
28.0.0-alpha.8
-
CI back in shape!!! ποΈββοΈπ€ΎπββοΈ
-
Updated dependencies; Jest 28 alpha.7
-
Need separate
npm install
on eithersample
and/orsample.dc
levelThis is a bit odd, but keeps the bleed of
firebase-tools
npm
warnings only on thesample
side - could soon call itsample.legacy
...
Time to manually test it; thinking of publishing only once Jest 28 is past its alpha.
- Updated dependencies; Jest 28 alpha.5
- Moved to
udici
fromnode-fetch
(Node native fetch is based on it)- pumps up Node requirement to 16.5+
npm
6 "support" removed
npm test
works, again- Introduced
sample.dc
for showing how one can use Docker Compose (instead of native Firebase Emulators) for running the Jest tests.
These changes only involve the
sample
layout, not the underlyingnpm
module. Thus, no new version published.
- Updated dependencies
- Moving to Jest 28 (alpha)!
- Removed
cjs
resolver provided by the package; instead asking users to copy-paste (and modify) a sample.
- Updated to
firebase-admin
10.0.0
- Updated to Jest
27.3.1
- Removed
debug
use, for simplicity
- CI changes:
- running tests with Docker, but not Docker Compose
- warm-up remains for CI: sometimes needed (see
APPROACH.md
)
- Updating dependency:
[email protected]
- Proper warming up of Cloud Functions finally implemented. With DC.
- CI test time of the first Rules test reduced, by running it first in
beforeAll
.
This means we can now comfortably use a 2000 ms timeout for all tests, in the CI, and they will pass.
- Brought back support for
npm
6. - CI scripts with help of Docker Compose (
docker/compose
image 1.29.2). - moved temporary files to use
/tmp
- ADD: Ability to set emulator host via
EMUL_HOST
env.var. Needed for use under Docker Compose.
- FIX: Clean up remaining
doc
listeners, allowing Jest to return to OS prompt. Counteracts Jest #11464 Unfortunately no Firebase Admin SDK issue, though the root cause is likely there. - CHANGE: No more leaking through Firebase Admin SDK APIs, but exposing only selected methods, deemed useful for testing.
- CLEANUP: Removed old (commented out)
eventually
code - OPTIMIZATION: 10..20% speed improvement on rules tests, due to transferring primed data via "intercom" temporary files.
- BUG FIX: Resolver fixed so
firestoreAdmin
works, from customer project.
- REWORK:
preheat_EXP
replaceslistener_EXP
(same thing, more focused role, reduced implementation) - BIG CHANGE: using the "modular API" Admin SDK (still in alpha)
- Docs revised (root and
ci
). - CHANGE (API): Removed
eventually
- was too specific and can be done in tests. - CHANGE (SAMPLE): No launch of emulators if there is an active Firebase project.
- FIX (SAMPLE): Using
demo-1
as the project ID (makes Firebase Emulators play local)
- [REWORK] Global lock waiting no longer polls, but listens to the document changes.
- [API CHANGE]
eventually
returns a Promise; no longer a polling Jest extension.
- Updated to Jest 27.0.1
- CHANGE: Moved
firebase-admin
to be an implementation detail (dependency instead of peer dependency) - Updated to
firebase-admin
9.9.0,firebase-tools
9.12.0 - FIX: Added
setRegion
forfirebaseClientLike
(callables testing), due to Cloud Functions Emulators in 9.12.0 being aware of regions.
- Documentation revise
- Re-implemented efficient locking.
- Implemented also
arrayRemove
andarrayUnion
sentinels/transforms, usingSymbol
. - Implemented
firebaseClientLike
forhttpsCallables
testing.
- Replaced
@firebase/rules-unit-test
with REST API calls.
- Upgraded to Jest 27.0.0-beta.9
- allowing making the Global setup scripts with ES modules! ππ₯³
- Not requiring
firebase-tools
to be globally installed. - Launching Jest without
npx
. - Dependency updates
- Separated publishable part to
package
- better separation of core code vs. build and sample/tests. - Changed Jest configuration files to use
export
.
- CHANGE: Removed
cloudFunctions
from the exported features; keeping this server-side only. Sample code is provided in theREADME
in case the downstream wants to test callables (only case where one needs a client side library in addition tofirebase-admin
). - Updated dependencies
- Dependency updates
- Needing
npm
>= 7.7.0 (or likely works withnpm
6)
- Dependency updates
- especially Jest
27.0.0.next4
fixes an earlier bug
- especially Jest
- Dependency updates
- Having a problem with
npm run test:fns:userInfo
- may be connected to this: jestjs/jest#11093- settle that before release
- Changed to Jest v27 (next.2)
- Updated to be compatible with Node.js 15 (15.5.0)
- Updated dependencies
- Reduced noise in
npm run ci
console output
- Dependency updates
- Bugfix: Moved
firebase
fromdependency
topeerDependency
. Was always the intention but somehow 0.0.1-beta.2 had it wrong. - Allows Cloud Functions emulator port to be defined in
firebase.json
:emulators.functions.port
.
- BUGFIX: changed references from scoped package.
- Changed to
node-fetch
3.0.0-beta
- Publishing to
npm
(was: GitHub Packages) - Documentation revise
- Dependency updates
- No API changes
API changes
- Full reorganization of the import names, based on Firebase product
Fixes
- Fixed bug in
jestResolver.cjs
that caused the package not to load in an app.
- Changes to make use from application work; e.g.
cjs/jestResolver
provided - Started publishing to GitHub Packages, as
@akauppi/firebase-jest-testing
Usage changes
- Runs on only one
firebase.json
per project (good so!!!) - only one
npm run start
command ci
tasks can be run against the same emulator
API changes
db
renameddbUnlimited
- tools for
globalSetup
now available as CommonJS code (cjs
); until Jest supports ES modules there
Internal changes
- Using
@firebase/rules-unit-testing
- Using
firebase-admin
directly, instead of.initializeAdminApp
- Using REST API
DELETE
directly, instead of@firebase/rules-unit-testing
Dependency changes
@firebase/rules-unit-testing
replaces@firebase/testing
(deprecated)node-fetch
addedproper-lockfile
added (omitted by mistake)
- removed the use of
firebase use
. Replaced with--project=bunny
, see #1
- using Jest custom resolver to be able to use package
exports
- picking active project only from
GCLOUD_PROJECT
(well, fallback to runfirebase use
)
- used with
npm link
with an app project - some
export
changes - need to publish because Jest might dislike
npm link
firebase**.json
and.firebaserc
brought to the root dir- Everything mentioned in
README
should work.
- reorganisation to
sample/test-fns
,sample/test-rules
-
npm run test:rest:all
passes - [~]Β
npm run test:rules:all
passes
- Security Rules tests implemented (uses ES modules, yay!)
- some tests still fail
npm run test:all
passes- initial;
expect.eventually
works