hunk.code_window: } from "../internal"
   export type IObservableDecorator = {
       (target: Object, property: string, descriptor?: PropertyDescriptor): void
       enhancer: IEnhancer<any>
   }
   export function createDecoratorForEnhancer(enhancer: IEnhancer<any>): IObservableDecorator {
       invariant(enhancer)
  
hunk.labels: keep keep keep replace keep keep keep keep keep
hunk.after_edit:     (target: Object, property: string | symbol, descriptor?: PropertyDescriptor): void
  
hunk.file_path: src/api/observabledecorator.ts
hunk.type: replace
file: "use strict"
  
  const mobx = require("../../src/mobx.ts")
  
  test("trace", () => {
      mobx._resetGlobalState()
      const baselog = console.log
      try {
          const lines = []
          console.log = function() {
              lines.push(arguments)
          }
  
          const x = mobx.observable({
              firstname: "Michel",
              lastname: "Weststrate",
              get fullname() {
                  var res = this.firstname + " " + this.lastname
                  mobx.trace(this, "fullname")
                  return res
              }
          })
  
          lines.push("- INIT -")
          x.fullname
  
          lines.push("- SECOND READ -")
          x.fullname
  
          lines.push("- REACTION -")
  
          const d = mobx.autorun(
              d => {
                  x.fullname
                  d.trace()
              },
              { name: "loggerzz" }
          )
  
          lines.push("- CHANGE -")
  
          mobx.transaction(() => {
              x.firstname = "John"
              x.lastname = "Doe"
          })
  
          lines.push("- DISPOSE -")
  
          d()
  
          expect(lines).toMatchSnapshot()
      } finally {
          console.log = baselog
      }
  })
  