Merge pull request #11001 from Snuffleupagus/Parser-shift-rm-isCmd
Inline the `isCmd` check in the `Parser.shift` method
This commit is contained in:
commit
1f287ec486
@ -67,7 +67,7 @@ class Parser {
|
||||
}
|
||||
|
||||
shift() {
|
||||
if (isCmd(this.buf2, 'ID')) {
|
||||
if ((this.buf2 instanceof Cmd) && this.buf2.cmd === 'ID') {
|
||||
this.buf1 = this.buf2;
|
||||
this.buf2 = null;
|
||||
} else {
|
||||
|
@ -1331,7 +1331,7 @@ describe('api', function() {
|
||||
|
||||
let [statEntry] = stats.times;
|
||||
expect(statEntry.name).toEqual('Page Request');
|
||||
expect(statEntry.end - statEntry.start).toBeGreaterThan(0);
|
||||
expect(statEntry.end - statEntry.start).toBeGreaterThanOrEqual(0);
|
||||
|
||||
loadingTask.destroy().then(done);
|
||||
}, done.fail);
|
||||
|
Loading…
x
Reference in New Issue
Block a user