GithubHelp home page GithubHelp logo

atom-gotests's Introduction

Atom gotests plugin

Atom-gotests makes writing better Go tests easy. It is an IDE plugin for Atom that uses gotests to generate table driven tests from selected function and method signatures. Any new dependencies in the test files are automatically imported.

Demo

demo

Installation

apm install gotests

atom-gotests's People

Contributors

abulimov avatar cipepser avatar dependabot[bot] avatar

Watchers

 avatar  avatar  avatar

atom-gotests's Issues

Uncaught TypeError: Cannot read property 'getPath' of undefined

[Enter steps to reproduce:]

  1. Open project
  2. Click Packages/GO tests/Generate

Atom: 1.27.0 x64
Electron: 1.7.11
OS: Mac OS X 10.12.6
Thrown From: gotests package 0.3.1

Stack Trace

Uncaught TypeError: Cannot read property 'getPath' of undefined

At /Users/z086990/.atom/packages/gotests/lib/gotests.js:108

TypeError: Cannot read property 'getPath' of undefined
    at Object.generate (/packages/gotests/lib/gotests.js:108:26)
    at /packages/gotests/lib/gotests.js:21:95)
    at CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:384:49)
    at CommandRegistry.dispatch (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:273:23)
    at AtomEnvironment.dispatchApplicationMenuCommand (/Applications/Atom.app/Contents/Resources/app/src/atom-environment.js:1347:25)
    at EventEmitter.outerCallback (/Applications/Atom.app/Contents/Resources/app/src/application-delegate.js:339:53)
    at emitThree (events.js:116:13)
    at EventEmitter.emit (events.js:197:7)

Commands

  2x -0:45.6.0 gotests:generate (atom-pane.pane.active)

Non-Core Packages

go-plus 5.8.3 
gotests 0.3.1 
platformio-ide-terminal 2.8.1 
sort-lines 0.18.0 

Changes required due to TextBuffer.save becoming async in Atom 1.19

Hi! Thanks for maintaining the gotests package!

In Atom v1.19, we will release a major change to Atom's core text buffer data structure. As part of this change, we have made TextBuffer.save asynchronous; rather than blocking until the save is complete, it now immediately returns a Promise that resolves when the save is complete. Because of this, a few other Atom APIs that use save have similarly become async:

  • Pane.close
  • TextBuffer.save
  • TextEditor.save
  • Pane.saveItem
  • Pane.saveItemAs
  • Pane.saveActiveItem
  • Pane.saveActiveItemAs
  • Pane.saveItems
  • Workspace.saveActivePaneItem
  • Workspace.saveActivePaneItemAs

Effects on this package

We think this package could be impacted by this upgrade because it calls the changed methods in the following places:

We found these calls using a regex search, so this list might be incomplete, and it might contain some false positives.

What to do about the change

It should be pretty easy to adjust your package code and/or tests to work with the new async behavior, and to simultaneously keep it working with older versions of Atom. Here are some examples of pull requests we opened on our bundled packages to cope with the change:

Let me know if you have any questions. I'd be happy to help!

Error- Failed to install gotests dependencies

This is popping up with every startup. Here are the relevant entries from the Atom console:
/Users/michael.gracy/.atom/packages/gotests/node_modules/atom-package-deps/lib/view.js:69 [Package-Deps] Unable to install go-config , Error: Request for package information failed: Not Foundcomplete @ /Users/michael.gracy/.atom/packages/gotests/node_modules/atom-package-deps/lib/view.js:69
/Users/michael.gracy/.atom/packages/gotests/node_modules/atom-package-deps/lib/view.js:69 [Package-Deps] Unable to install go-get , Error: Request for package information failed: Not Foundcomplete @ /Users/michael.gracy/.atom/packages/gotests/node_modules/atom-package-deps/lib/view.js:69

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.