While using cucumber and sublime text 3 to develop some test cases, I encountered an issue with creating a snippet. When trying to call the snippet with the tab button, nothing happened as expected. Upon investigating, I discovered that the problem lies within the code, specifically the use of the $ symbol in the step description.
The snippet in question:
<snippet>
<content><![CDATA[
'use strict';
module.exports = function() {
var Given = this.Given,
When = this.When,
Then = this.Then;
Given(/^description$/, function(cb) {
cb();
});
When(/^description$/, function(cb) {
cb();
});
Then(/^description$/, function(cb) {
cb();
});
};
]]></content>
<tabTrigger>step</tabTrigger>
<scope>source.js</scope>
<description>To create a step in cucumber</description>
</snippet>
Upon removing the $ from the step description, the snippet started functioning correctly. However, I require this symbol in the step. What should I do in such a scenario?