-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It at least prevents this extension from being entirely corrupted.
- Loading branch information
Showing
5 changed files
with
64 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
.vscode-test | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,11 @@ | ||
git: | ||
depth: 1 | ||
branches: | ||
except: /^v\d/ | ||
language: node_js | ||
node_js: node | ||
before_install: npm install --global npm@next | ||
matrix: | ||
include: | ||
- script: eval xvfb-run `jq --raw-output .scripts.test < package.json` | ||
- os: osx | ||
osx_image: xcode9.3beta | ||
branches: | ||
except: /^v\d/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
.editorconfig | ||
.gitignore | ||
.vscode/** | ||
*.css | ||
*.png | ||
*.scss | ||
*.less | ||
media/*.ai | ||
test | ||
.editorconfig | ||
.gitignore | ||
.vscode | ||
.vscode-test | ||
*.css | ||
*.less | ||
*.png | ||
*.scss | ||
*.yml | ||
media/*.ai | ||
test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/* eslint-disable node/no-unpublished-require */ | ||
'use strict'; | ||
|
||
const test = require('tape'); | ||
const {extensions, workspace, window} = require('vscode'); | ||
|
||
const run = () => test('vscode-stylelint', async t => { | ||
const vscodeStylelint = extensions.getExtension('shinnn.stylelint'); | ||
|
||
const plaintextDocument = await workspace.openTextDocument({ | ||
content: 'Hello', | ||
language: 'plaintext' | ||
}); | ||
|
||
await window.showTextDocument(plaintextDocument); | ||
|
||
t.equal( | ||
vscodeStylelint.isActive, | ||
false, | ||
'should not be activated when the open file is not CSS.' | ||
); | ||
|
||
const cssDocument = await workspace.openTextDocument({ | ||
content: '}', | ||
language: 'css' | ||
}); | ||
|
||
await window.showTextDocument(cssDocument); | ||
|
||
t.equal( | ||
vscodeStylelint.isActive, | ||
true, | ||
'should be activated when the open file is CSS.' | ||
); | ||
|
||
t.end(); | ||
}); | ||
|
||
exports.run = (root, done) => { | ||
test.onFinish(done); | ||
run(); | ||
}; |