• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

realm / realm-js / 5354418719

23 Jun 2023 08:36AM UTC coverage: 85.663%. Remained the same
5354418719

push

github

kraenhansen
An attempt to fix async tests

845 of 1050 branches covered (80.48%)

Branch coverage included in aggregate %.

2244 of 2556 relevant lines covered (87.79%)

755.49 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/packages/realm/src/platform/react-native/fs.ts
1
////////////////////////////////////////////////////////////////////////////
2
//
3
// Copyright 2022 Realm Inc.
4
//
5
// Licensed under the Apache License, Version 2.0 (the "License");
6
// you may not use this file except in compliance with the License.
7
// You may obtain a copy of the License at
8
//
9
// http://www.apache.org/licenses/LICENSE-2.0
10
//
11
// Unless required by applicable law or agreed to in writing, software
12
// distributed under the License is distributed on an "AS IS" BASIS,
13
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
// See the License for the specific language governing permissions and
15
// limitations under the License.
16
//
17
////////////////////////////////////////////////////////////////////////////
18
import { isAbsolute, join } from "path-browserify";
19

20
import { inject } from "../file-system";
21
import { extendDebug } from "../../debug";
22
import { Helpers, JsPlatformHelpers } from "../../binding";
23

24
const debug = extendDebug("fs");
×
25

26
inject({
×
27
  isAbsolutePath(path) {
28
    return isAbsolute(path);
×
29
  },
30
  joinPaths(...segments) {
31
    return join(...segments);
×
32
  },
33
  removeFile(path) {
34
    debug("removeFile", path);
×
35
    JsPlatformHelpers.removeFile(path);
×
36
  },
37
  removeDirectory(path) {
38
    debug("removeDirectory", path);
×
39
    JsPlatformHelpers.removeDirectory(path);
×
40
  },
41
  ensureDirectoryForFile(path) {
42
    debug("ensureDirectoryForFile", path);
×
43
    JsPlatformHelpers.ensureDirectoryExistsForFile(path);
×
44
  },
45
  getDefaultDirectoryPath() {
46
    return JsPlatformHelpers.defaultRealmFileDirectory();
×
47
  },
48
  exists(path) {
49
    return Helpers.fileExists(path);
×
50
  },
51
  copyBundledRealmFiles() {
52
    JsPlatformHelpers.copyBundledRealmFiles();
×
53
  },
54
  /*
55
  readDirectory(path) {
56
    JsPlatformHelpers.
57
  },
58
  */
59
  removeRealmFilesFromDirectory(path) {
60
    debug("removeRealmFilesFromDirectory", path);
×
61
    JsPlatformHelpers.removeRealmFilesFromDirectory(path);
×
62
  },
63
});
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc