-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Badge For Visual Studio Marketplace added. #1074
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
ccd6680
Vscode download badge added
ritwickdey 340d0f0
vscode rating added
ritwickdey 56bc2c5
renamed
ritwickdey 9a9a6f0
console.log function removed
ritwickdey 58b181d
code formated
ritwickdey 86872e1
version added
ritwickdey 8f1b069
html added to try.html
ritwickdey b32bfea
unused variable removed
ritwickdey 33221a7
Merge remote-tracking branch 'upstream/master'
ritwickdey 82d7970
test case added
ritwickdey 60b15c5
fixing lint
ritwickdey ded5a0d
Code refactored, more specific Test Case, small fixes and fixed confl…
ritwickdey aab26cb
route changed to /vscode-marketplace/d|r|v/*
ritwickdey 97a957b
refactored - all route for vscode combined into one place.
ritwickdey bf5e7ce
fixed lint
ritwickdey 4a8e451
more test added
ritwickdey ff8a5be
VSM changed to lowercase
ritwickdey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,49 @@ | ||
'use strict'; | ||
|
||
const Joi = require('joi'); | ||
const ServiceTester = require('./runner/service-tester'); | ||
|
||
const t = new ServiceTester({ id: 'vscode-marketplace', title: 'VS Code Marketplace' }); | ||
module.exports = t; | ||
|
||
t.create('downloads should be formatted. eg. downloads|72M') | ||
.get('/d/ritwickdey.LiveServer.json') | ||
.expectJSONTypes(Joi.object().keys({ | ||
name: Joi.equal('downloads'), | ||
value: Joi.string().regex(/^[0-9]+[K|M]?$/i) | ||
})); | ||
|
||
t.create('downloads label should be changed to custom label. eg. Total Installs|72M') | ||
.get('/d/ritwickdey.LiveServer.json?label="Total Installs"') | ||
.expectJSONTypes(Joi.object().keys({ | ||
name: Joi.equal('Total Installs'), | ||
value: Joi.string().regex(/^[0-9]+[K|M]?$/i) | ||
})); | ||
|
||
t.create('rating should be formatted. eg. rating|4.25/5(30)') | ||
.get('/r/ritwickdey.LiveServer.json') | ||
.expectJSONTypes(Joi.object().keys({ | ||
name: Joi.equal('rating'), | ||
value: Joi.string().regex(/[0-5].[0-9]{2}\/5?\s*\([0-9]*\)$/) | ||
})); | ||
|
||
t.create('rating label should be changed to custom label. eg. My custom rating label|4.25/5(30)') | ||
.get('/r/ritwickdey.LiveServer.json?label="My custom rating label"') | ||
.expectJSONTypes(Joi.object().keys({ | ||
name: Joi.equal('My custom rating label'), | ||
value: Joi.string().regex(/[0-5].[0-9]{2}\/5?\s*\([0-9]*\)$/) | ||
})); | ||
|
||
t.create('version should be formatted. eg. Visual Studio Marketplace|v7.2.5') | ||
.get('/v/ritwickdey.LiveServer.json') | ||
.expectJSONTypes(Joi.object().keys({ | ||
name: Joi.equal('visual studio marketplace'), | ||
value: Joi.string().regex(/^v[0-9]*.[0-9]*.[0-9]*$/) | ||
})); | ||
|
||
t.create('version label should be changed to custom label. eg. VSM|v7.2.5') | ||
.get('/v/ritwickdey.LiveServer.json?label=VSM') | ||
.expectJSONTypes(Joi.object().keys({ | ||
name: Joi.equal('VSM'), | ||
value: Joi.string().regex(/^v[0-9]*.[0-9]*.[0-9]*$/) | ||
})); |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for refactoring this!