hunk.code_window: }
   /**
    * These classes are needed for stream operations or
    * in the mongodb driver. both aren't supported in the browser
    */
   export class EventEmitter {}
  
hunk.labels: keep keep keep keep replace keep keep keep
hunk.after_edit:  * in the mongodb driver. Both aren't supported in the browser.
  
hunk.file_path: src/platform/BrowserPlatformTools.template
hunk.type: replace
file: import "reflect-metadata";
  import {expect} from "chai";
  import {closeTestingConnections, createTestingConnections, reloadTestingDatabases} from "../../../utils/test-utils";
  import {Connection} from "../../../../src/connection/Connection";
  import {Post} from "./entity/Post";
  
  describe("columns > readonly functionality", () => {
  
      let connections: Connection[];
      before(async () => connections = await createTestingConnections({
          entities: [Post],
      }));
      beforeEach(() => reloadTestingDatabases(connections));
      after(() => closeTestingConnections(connections));
  
      it("should not update columns marked with readonly property", () => Promise.all(connections.map(async connection => {
  
          const postRepository = connection.getRepository(Post);
  
          // create and save a post first
          const post = new Post();
          post.title = "About columns";
          post.text = "Some text about columns";
          post.authorName = "Umed";
          await postRepository.save(post);
  
          // then update all its properties and save again
          post.title = "About columns1";
          post.text = "Some text about columns1";
          post.authorName = "Umed1";
          await postRepository.save(post);
  
          // check if all columns are updated except for readonly columns
          const loadedPost = await postRepository.findOne(1);
          expect(loadedPost!.title).to.be.equal("About columns1");
          expect(loadedPost!.text).to.be.equal("Some text about columns1");
          expect(loadedPost!.authorName).to.be.equal("Umed1");
  
      })));
  
  
  });
  