NatLibFi/marc-record-js

View on GitHub
test-fixtures/index/insertFields/03/metadata.json

Summary

Maintainability
Test Coverage
{
  "description": "Should insert fields from array to correct places",
  "skip": false,
  "input": {
    "leader": "02848ccm a22005894i 4500",
    "fields":
    [
      {"tag": "001", "value": "bar"},
      {"tag": "003", "value": "bar"},
      {"tag": "005", "value": "bar"}
    ]
  },
  "operations": [
    { "name": "insertFields", "args":
      [
        {"tag": "004", "value": "bar"},
        {"tag": "002", "value": "bar"},
        {"tag": "006", "value": "bar"},
        {"tag": "007", "value": "t|"},
        {"tag": "007", "value": "qu"}
      ]
    }
  ],
  "result": {
    "leader": "02848ccm a22005894i 4500",
    "fields":
    [
      {"tag": "001", "value": "bar"},
      {"tag": "002", "value": "bar"},
      {"tag": "003", "value": "bar"},
      {"tag": "004", "value": "bar"},
      {"tag": "005", "value": "bar"},
      {"tag": "006", "value": "bar"},
      {"tag": "007", "value": "t|"},
      {"tag": "007", "value": "qu"}
    ]
  }
}