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

streetsidesoftware / cspell / 12339180630

15 Dec 2024 01:23PM UTC coverage: 94.057%. First build
12339180630

Pull #6671

github

web-flow
Merge 825fb3d46 into 2ed706e50
Pull Request #6671: feat: Support Windows UNC files.

14048 of 16216 branches covered (86.63%)

44 of 59 new or added lines in 13 files covered. (74.58%)

15147 of 16104 relevant lines covered (94.06%)

31160.14 hits per line

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

50.0
/packages/cspell-lib/src/lib/Settings/resolveCwd.ts
1
import { toFileDirURL, toFileURL } from '@cspell/url';
2

3
export class CwdUrlResolver {
4
    #lastPath: string;
5
    #lastUrl: URL;
6
    #cwd: string;
7
    #cwdUrl: URL;
8

9
    constructor() {
10
        this.#cwd = process.cwd();
25✔
11
        this.#cwdUrl = toFileDirURL(this.#cwd);
25✔
12
        this.#lastPath = this.#cwd;
25✔
13
        this.#lastUrl = this.#cwdUrl;
25✔
14
    }
15
    resolveUrl(path?: string): URL {
16
        path = path || this.#cwd;
234✔
17
        if (path === this.#lastPath) return this.#lastUrl;
234!
18
        if (path === this.#cwd) return this.#cwdUrl;
×
19
        this.#lastPath = path;
×
NEW
20
        this.#lastUrl = toFileURL(path);
×
21
        return this.#lastUrl;
×
22
    }
23

24
    reset(cwd: string = process.cwd()) {
×
25
        this.#cwd = cwd;
×
NEW
26
        this.#cwdUrl = toFileDirURL(this.#cwd);
×
27
    }
28
}
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