# all files / files/ ComponentFile.js

100% Statements 69/69
100% Branches 34/34
100% Functions 12/12
100% Lines 4/4
9 statements, 14 branches Ignored

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18

    2

    1

    2

     'use strict';

    // Dependencies:
    import JavaScriptFile from './JavaScriptFile';

    export default class ComponentFile extends JavaScriptFile {
        delete () {
            return super.delete()
            .then(() => deleteFileReferences.call(this));
        }
    }

    function deleteFileReferences () {
        let { references } = this.directory.fileStructure;

        delete references[this.path];
    }