Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 50 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,52 @@
node_modules
npm-debug.log
.DS_Store
.DS_Store
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm

*.iml

## Directory-based project format:
.idea/
# if you remove the above rule, at least ignore the following:

# User-specific stuff:
# .idea/workspace.xml
# .idea/tasks.xml
# .idea/dictionaries

# Sensitive or high-churn files:
# .idea/dataSources.ids
# .idea/dataSources.xml
# .idea/sqlDataSources.xml
# .idea/dynamic.xml
# .idea/uiDesigner.xml

# Gradle:
# .idea/gradle.xml
# .idea/libraries

# Mongo Explorer plugin:
# .idea/mongoSettings.xml

## File-based project format:
*.ipr
*.iws

## Plugin-specific files:

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties


10 changes: 9 additions & 1 deletion lib/nexpect.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,11 @@ function chain (context) {
// function run had `name`.
//
function evalContext (data, name) {
var currentFn = context.queue[0];

var currentFn;

if (context.queue.length > 0)
currentFn = context.queue[0];

if (!currentFn || (name === '_expect' && currentFn.name === '_expect')) {
//
Expand Down Expand Up @@ -304,6 +308,10 @@ function chain (context) {
callback(null, stdout, signal || code);
});

setTimeout(function() {
evalContext();
});

return context.process;
}
};
Expand Down