hunk.code_window:     /**
        * Loads a database from a given file (Node.js), local storage key (browser) or array.
        * This will delete the current database!
        */
       load(fileNameOrLocalStorageOrData: string | Uint8Array, checkIfFileOrLocalStorageExists: boolean = true): Promise<any> {
           if (typeof fileNameOrLocalStorageOrData === "string") {
               // content has to be loaded
               if (PlatformTools.type === "node") {
                   // Node.js
  
hunk.labels: keep keep keep keep replace keep keep keep keep
hunk.after_edit:     async load(fileNameOrLocalStorageOrData: string | Uint8Array, checkIfFileOrLocalStorageExists: boolean = true): Promise<any> {
  
hunk.file_path: src/driver/sqljs/SqljsDriver.ts
hunk.type: replace
file: import "reflect-metadata";
  import {closeTestingConnections, createTestingConnections, reloadTestingDatabases} from "../../../utils/test-utils";
  import {Connection} from "../../../../src/connection/Connection";
  import {Post} from "./entity/Post";
  import {PostDetails} from "./entity/PostDetails";
  
  describe("cascades > should insert by cascades from both sides (#57)", () => {
  
      let connections: Connection[];
      before(async () => connections = await createTestingConnections({
          entities: [__dirname + "/entity/*{.js,.ts}"],
      }));
      beforeEach(() => reloadTestingDatabases(connections));
      after(() => closeTestingConnections(connections));
  
      it("should insert by cascades from owner side", () => Promise.all(connections.map(async connection => {
  
          // first create details but don't save them because they will be saved by cascades
          const details = new PostDetails();
          details.keyword = "post-1";
  
          // then create and save a post with details
          const post1 = new Post();
          post1.title = "Hello Post #1";
          post1.details = details;
          await connection.manager.save(post1);
  
          // now check
          const posts = await connection.manager.find(Post, {
              join: {
                  alias: "post",
                  innerJoinAndSelect: {
                      details: "post.details"
                  }
              }
          });
  
          posts.should.be.eql([{
              key: 1,
              title: "Hello Post #1",
              details: {
                  keyword: "post-1"
              }
          }]);
  
      })));
  
  });
  