Published
Edited
Aug 23, 2021
Importers
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
collection_listen = listen(firebase.firestore().collection("services/testing/example"), {
includeRef: true
})
Insert cell
doc_listen = listen(firebase.firestore().doc("services/testing/example/example1"))
Insert cell
default_value = listen(firebase.firestore().doc("services/testing/example/empty"), {
defaultValue: {}
})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
viewof testView = new DocsView(firebase.firestore().collection("services/testing/example"))
Insert cell
testView
Insert cell
docsViewTests.test("First value is the result", () => {
// Well this is a pass but the Runtime won't allow a cell to catch the Runtime error
console.log("expect?")
expect(testView[0].string).toBe("aString")
})
Insert cell
Insert cell
docsViewTests.test("Permission errors bubble up", () => {
// Well this is a pass but the Runtime won't allow a cell to catch the Runtime error
expect(() => permissionDeniedView).toThrow()
})
Insert cell
Insert cell
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more