 
   describe "less", ->
     beforeEach ->
-      atom.packages.activatePackage('language-less', sync: true)
-      atom.packages.activatePackage('language-css', sync: true)
       editor = atom.project.openSync('sample.less', autoIndent: false)
       {buffer, languageMode} = editor
+
+      waitsForPromise ->
+        atom.packages.activatePackage('language-less')
+
+      waitsForPromise ->
+        atom.packages.activatePackage('language-css')
 
     describe "when commenting lines", ->
       it "only uses the `commentEnd` pattern if it comes from the same grammar as the `commentStart`", ->


  describe "coffeescript", ->
    beforeEach ->
      atom.packages.activatePackage('language-coffee-script', sync: true)
      editor = atom.project.openSync('coffee.coffee', autoIndent: false)
      {buffer, languageMode} = editor

    describe ".toggleLineCommentsForBufferRows(start, end)", ->
      it "comments/uncomments lines in the given range", ->


  describe "folding", ->
    beforeEach ->
      editor = atom.project.openSync('sample.js', autoIndent: false)
      {buffer, languageMode} = editor

      waitsForPromise ->
        atom.packages.activatePackage('language-javascript')

    it "maintains cursor buffer position when a folding/unfolding", ->
      editor.setCursorBufferPosition([5,5])
