forked from MagicStack/MagicPython
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbasics-spec.js
More file actions
25 lines (21 loc) · 731 Bytes
/
basics-spec.js
File metadata and controls
25 lines (21 loc) · 731 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
describe("MagicPython basic integration tests", function() {
var grammar = null;
beforeEach(function() {
waitsForPromise(function() {
return atom.packages.activatePackage("MagicPython")
});
runs(function() {
grammar = atom.grammars.grammarForScopeName("source.python")
});
});
it("recognises shebang on firstline", function() {
expect(grammar.firstLineRegex.scanner.findNextMatchSync(
"#!/usr/bin/env python")).not.toBeNull();
expect(grammar.firstLineRegex.scanner.findNextMatchSync(
"#! /usr/bin/env python")).not.toBeNull();
});
it("parses the grammar", function() {
expect(grammar).toBeDefined();
expect(grammar.scopeName).toBe("source.python");
});
});