hunk.code_window:     /**
        * This gets called by the QueryRunner when a change to the database is made.
        * If a custom autoSaveCallback is specified, it get's called with the database as Uint8Array,
        * otherwise the save method is called which saves it to file (Node.js) or localstorage (browser).
        */
       async autoSave() {
           if (this.options.autoSave) {
               if (this.options.autoSaveCallback) {
                   await this.options.autoSaveCallback(this.export());
  
hunk.labels: keep keep keep keep replace keep keep keep keep keep
hunk.after_edit:      * otherwise the save method is called which saves it to file (Node.js), local storage (browser)
        * or indexedDB (browser with enabled useLocalforage option).
  
hunk.file_path: src/driver/sqljs/SqljsDriver.ts
hunk.type: replace
file: import "reflect-metadata";
  import {Post} from "./entity/Post";
  import {ContentModule} from "./entity/ContentModule";
  import {Unit} from "./entity/Unit";
  import {MetadataUtils} from "../../../../src/metadata-builder/MetadataUtils";
  
  describe("metadata builder > MetadataArgsUtils", () => {
  
      it("getInheritanceTree", () => {
          const inheritanceTree = MetadataUtils.getInheritanceTree(Post);
          inheritanceTree.should.be.eql([
              Post,
              ContentModule,
              Unit,
          ]);
      });
  
      it("filterByTargetClasses", () => {
          MetadataUtils.filterByTarget([
              { },
              { target: undefined },
              { target: null },
              { target: 1 },
              { target: "" },
              { target: Post },
              { target: ContentModule },
              { target: Unit },
          ], [Post, Unit]).should.be.eql([
              { target: Post },
              { target: Unit },
          ]);
  
          MetadataUtils.filterByTarget([
              { },
              { target: undefined },
              { target: null },
              { target: 1 },
              { target: "" },
              { target: ContentModule },
              { target: Unit },
          ], [Post, Unit]).should.be.eql([
              { target: Unit },
          ]);
  
          MetadataUtils.filterByTarget([
              { },
              { target: undefined },
              { target: null },
              { target: 1 },
              { target: "" },
              { target: ContentModule },
              { target: Post },
              { target: Unit },
          ], [Post, Unit, ContentModule]).should.be.eql([
              { target: ContentModule },
              { target: Post },
              { target: Unit },
          ]);
  
          MetadataUtils.filterByTarget([
          ], [Post, Unit, ContentModule]).should.be.eql([
          ]);
  
          MetadataUtils.filterByTarget([
              { },
              { target: undefined },
              { target: null },
              { target: 1 },
              { target: "" },
              { target: ContentModule },
              { target: Post },
              { target: Unit },
          ]).should.be.eql([
              { },
              { target: undefined },
              { target: null },
              { target: 1 },
              { target: "" },
              { target: ContentModule },
              { target: Post },
              { target: Unit },
          ]);
      });
  
  });