• Sean Hammond's avatar
    Improve AnnotationSync test names · 877fb348
    Sean Hammond authored
    Rename all the tests to better reflect what they actually test.
    
    Mostly replacing broadcast local event bus publisher proxying with
    "calls function", plus a couple of other clarifications.
    
    Before:
    
      AnnotationSync
        channel event handlers
          the "deleteAnnotation" event
            ✓ broadcasts the "annotationDeleted" event over the local event bus
            ✓ calls back with a formatted annotation
            ✓ removes an existing entry from the cache before the event is triggered
            ✓ removes the annotation from the cache
          the "loadAnnotations" event
            ✓ publishes the "annotationsLoaded" event
        event handlers
          the "beforeAnnotationCreated" event
            ✓ proxies the event over the bridge
            ✓ returns early if the annotation has a tag
    
    After:
    
      AnnotationSync
        #constructor
          when "deleteAnnotation" is published
            ✓ calls emit("annotationDeleted")
            ✓ calls the 'deleteAnnotation' event's callback function
            ✓ deletes any existing annotation from its cache before calling emit
            ✓ deletes any existing annotation from its cache
          when "loadAnnotations" is published
            ✓ calls emit("annotationsLoaded")
          when "beforeAnnotationCreated" is emitted
            ✓ calls bridge.call() passing the event
            if the annotation has a $tag
              ✓ does not call bridge.call()
    877fb348
Name
Last commit
Last update
.github Loading commit data...
docs Loading commit data...
images Loading commit data...
scripts Loading commit data...
src Loading commit data...
.eslintignore Loading commit data...
.eslintrc Loading commit data...
.gitignore Loading commit data...
.npmignore Loading commit data...
.npmrc Loading commit data...
.travis.yml Loading commit data...
CHANGELOG.md Loading commit data...
CODE_OF_CONDUCT Loading commit data...
Jenkinsfile Loading commit data...
LICENSE Loading commit data...
Makefile Loading commit data...
README.md Loading commit data...
gulpfile.js Loading commit data...
npm-shrinkwrap.json Loading commit data...
package.json Loading commit data...
requirements-dev.in Loading commit data...