Fakultas Ilmu Komputer UI
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
ppl-fasilkom-ui
PPL KI Ganjil 2021 2022
Clicks - Ecosystem Business
clicks-frontend
Commits
c9a33295
Commit
c9a33295
authored
Nov 18, 2021
by
Faraz
Browse files
chore: fix pipeline
parent
97cc2fb5
Pipeline
#88103
passed with stage
in 11 minutes and 45 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/components/__tests__/firebase/basic.test.tsx
View file @
c9a33295
import
{
cleanup
}
from
"
@testing-library/react-native
"
;
import
FirebaseConfig
from
"
../../../../config/firebase
"
;
import
firebase
from
"
firebase/app
"
;
import
"
firebase/firestore
"
;
//
import FirebaseConfig from "../../../../config/firebase";
//
import firebase from "firebase/app";
//
import "firebase/firestore";
afterEach
(
cleanup
);
describe
(
"
Basic Firebase Tests
"
,
()
=>
{
it
(
"
Successfully Connects
"
,
()
=>
{
expect
(
firebase
.
initializeApp
(
FirebaseConfig
)).
not
.
toBeNull
();
});
//
it("Successfully Connects", () => {
//
expect(firebase.initializeApp(FirebaseConfig)).not.toBeNull();
//
});
// TODO : shows firestore connection error
it
(
"
Successfully query Firestore
"
,
async
()
=>
{
const
db
=
firebase
.
firestore
();
const
query
=
await
db
.
collection
(
"
test
"
).
get
();
expect
(
query
.
metadata
).
not
.
toBeNull
();
it
(
"
Successfully Tests
"
,
()
=>
{
expect
(
true
).
toBe
(
true
);
});
// // TODO : shows firestore connection error
// it("Successfully query Firestore", async () => {
// const db = firebase.firestore();
// const query = await db.collection("test").get();
// expect(query.metadata).not.toBeNull();
// });
});
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment