Skip to content

Commit 0c18298

Browse files
committed
fix merge issues
1 parent b76de52 commit 0c18298

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

lib/ResolverFactory.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ exports.createResolver = function (options) {
303303
resolver.ensureHook("resolved");
304304

305305
// TODO remove in next major
306+
// cspell:word Interal
306307
// Backward-compat
307308
resolver.hooks.newInteralResolve = resolver.hooks.newInternalResolve;
308309

lib/getPaths.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"use strict";
77

88
module.exports = function getPaths(path) {
9-
if (path === "/") return { paths: ["/"], seqments: [""] };
9+
if (path === "/") return { paths: ["/"], segments: [""] };
1010
const parts = path.split(/(.*?[\\/]+)/);
1111
const paths = [path];
1212
const segments = [parts[parts.length - 1]];

test/getPaths.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@ require("should");
33
const getPaths = require("../lib/getPaths");
44

55
/**
6-
* @type {[string,{paths: string[], seqments: string[]}][]}
6+
* @type {[string,{paths: string[], segments: string[]}][]}
77
*/
88
const cases = [
9-
["/a", { paths: ["/a", "/"], seqments: ["a", "/"] }],
10-
["/a/", { paths: ["/a/", "/a", "/"], seqments: ["", "a", "/"] }],
11-
["/a/b", { paths: ["/a/b", "/a", "/"], seqments: ["b", "a", "/"] }],
9+
["/a", { paths: ["/a", "/"], segments: ["a", "/"] }],
10+
["/a/", { paths: ["/a/", "/a", "/"], segments: ["", "a", "/"] }],
11+
["/a/b", { paths: ["/a/b", "/a", "/"], segments: ["b", "a", "/"] }],
1212
[
1313
"/a/b/",
14-
{ paths: ["/a/b/", "/a/b", "/a", "/"], seqments: ["", "b", "a", "/"] }
14+
{ paths: ["/a/b/", "/a/b", "/a", "/"], segments: ["", "b", "a", "/"] }
1515
],
16-
["/", { paths: ["/"], seqments: [""] }]
16+
["/", { paths: ["/"], segments: [""] }]
1717
];
1818

1919
cases.forEach(case_ => {
2020
it(case_[0], () => {
21-
const { paths, seqments } = getPaths(case_[0]);
21+
const { paths, segments } = getPaths(case_[0]);
2222
paths.should.be.eql(case_[1].paths);
23-
seqments.should.be.eql(case_[1].seqments);
23+
segments.should.be.eql(case_[1].segments);
2424
});
2525
});

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy