# all files / api/transformers/ mock-data-transformer.js

100% Statements 15/15
100% Branches 4/4
100% Functions 3/3
100% Lines 3/3
1 branch Ignored

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13

    1

    2

     'use strict';

    // Dependencies:
    import { camel } from 'change-case';
    import transforms from './transforms';

    export default function mockDataTransformer (file, options) {
        let { oldName, newName, oldPath, newPath } = options;

        return transforms.transformReferences('mockData', oldPath, newPath, oldName, newName)
        .then(() => transforms.transformReferenceIdentifiers(newPath, camel(oldName), camel(newName)));
    }