Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
adds realistic node dir
  • Loading branch information
r1b committed Oct 3, 2017
commit afaba3daaa5e02220e49f236943648fbebbab577
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Array [
"id": "foo",
"internal": Object {
"contentDigest": "8838e569ae02d98806532310fb2a577a",
"type": "BlahJsonJson",
"type": "FooJson",
},
"parent": "whatever",
},
Expand All @@ -29,14 +29,14 @@ Array [
"id": "foo",
"internal": Object {
"contentDigest": "8838e569ae02d98806532310fb2a577a",
"type": "BlahJsonJson",
"type": "FooJson",
},
"parent": "whatever",
},
"parent": Object {
"children": Array [],
"content": "{\\"id\\":\\"foo\\",\\"blue\\":true,\\"funny\\":\\"yup\\"}",
"dir": "/tmp/blah.json",
"dir": "/tmp/foo/",
"id": "whatever",
"internal": Object {
"contentDigest": "whatever",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe(`Process JSON nodes correctly`, () => {
it(`correctly creates a node from JSON which is a single object`, async () => {
const data = { id: `foo`, blue: true, funny: `yup` }
node.content = JSON.stringify(data)
node.dir = `/tmp/blah.json`
node.dir = `/tmp/foo/`

const createNode = jest.fn()
const createParentChildLink = jest.fn()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Array [
"id": "whatever >>> YAML",
"internal": Object {
"contentDigest": "73901821b17d5aa9dd6026181f73b64c",
"type": "BlahYmlYaml",
"type": "BarYaml",
},
"parent": "whatever",
},
Expand All @@ -29,7 +29,7 @@ Array [
"id": "whatever >>> YAML",
"internal": Object {
"contentDigest": "73901821b17d5aa9dd6026181f73b64c",
"type": "BlahYmlYaml",
"type": "BarYaml",
},
"parent": "whatever",
},
Expand All @@ -38,7 +38,7 @@ Array [
"content": "blue: true
funny: yup
",
"dir": "/tmp/blah.yml",
"dir": "/tmp/bar/",
"id": "whatever",
"internal": Object {
"contentDigest": "whatever",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ describe(`Process YAML nodes correctly`, () => {
it(`correctly creates a node from JSON which is a single object`, async () => {
const data = { blue: true, funny: `yup` }
node.content = yaml.safeDump(data)
node.dir = `/tmp/blah.yml`
node.dir = `/tmp/bar/`

const createNode = jest.fn()
const createParentChildLink = jest.fn()
Expand Down