Closed nweldev closed 4 years ago
Thanks, I'll update npm in a few minutes.
@noelmace, I had to reverse this commit, because it failed a test.
Could you please examine docs/example-missing-readme
and related test. It passes when there is no md
in folder.
Could you please create a new failing test for your case and create a PR solving it.
Thanks again.
Hi ozum. If I understand correctly, you're talking about "should throw for missing README.md in Navbar", which was already failing before. I just ran npm run test
on 611b4fb just to be sure :
Yet, this PR still introduced a regression, as it broke "sort file and folder by prefix" :
getConfig › sort file and folder by prefix
expect(received).toEqual(expected) // deep equality
- Expected
+ Received
@@ -1,16 +1,16 @@
Object {
"nav": Array [],
"sidebar": Array [
"01-file",
+ "03-file",
Object {
"children": Array [
"02-folder/file",
],
"title": "Folder",
},
- "03-file",
Object {
"children": Array [
"no-name/last",
],
"title": "No Name",
30 |
31 | it("sort file and folder by prefix", async () => {
> 32 | expect(configOf("sort")).toEqual(expected("sort"));
| ^
33 | });
34 | });
35 |
at Object.<anonymous> (lib/index.test.js:32:30)
My bad :sweat: I'm on it!
done in #16
if a directory only has subdirectories, a TypeError
(link.children[0] || "").split is not a function
was raised