axe312ger/sftp-cache

View on GitHub
src/__snapshots__/diff.test.js.snap

Summary

Maintainability
Test Coverage
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`complex variant 1`] = `
Object {
  "filesToDownload": Array [
    "dir-to-cache/example-file-name.md",
    "dir-to-cache/subdir/file-with-content.md",
  ],
  "filesToUpload": Array [
    "dir-to-cache/file-in-root-dir.empty",
    "dir-to-cache/subdir/file-with-content.md",
  ],
}
`;

exports[`does not sync file when timestamp differs but size and md5 match 1`] = `
Object {
  "filesToDownload": Array [],
  "filesToUpload": Array [],
}
`;

exports[`file differs in size 1`] = `
Object {
  "filesToDownload": Array [
    "dir-to-cache/file-in-root-dir.md",
  ],
  "filesToUpload": Array [
    "dir-to-cache/file-in-root-dir.md",
  ],
}
`;

exports[`local has extra file 1`] = `
Object {
  "filesToDownload": Array [],
  "filesToUpload": Array [
    "dir-to-cache/file-in-root-dir.empty",
  ],
}
`;

exports[`local has newer file 1`] = `
Object {
  "filesToDownload": Array [
    "dir-to-cache/example-file-name.md",
  ],
  "filesToUpload": Array [
    "dir-to-cache/example-file-name.md",
  ],
}
`;

exports[`remote has extra file 1`] = `
Object {
  "filesToDownload": Array [
    "dir-to-cache/file-in-root-dir.empty",
  ],
  "filesToUpload": Array [],
}
`;

exports[`remote has newer file 1`] = `
Object {
  "filesToDownload": Array [
    "dir-to-cache/example-file-name.md",
  ],
  "filesToUpload": Array [
    "dir-to-cache/example-file-name.md",
  ],
}
`;

exports[`syncs file when size is same but timestamp and md5 differ 1`] = `
Object {
  "filesToDownload": Array [
    "dir-to-cache/maybe-updated.file",
  ],
  "filesToUpload": Array [
    "dir-to-cache/maybe-updated.file",
  ],
}
`;