-
Notifications
You must be signed in to change notification settings - Fork 30
Transition to Jest, Increase Languages Tested, and Fix Bug with Sub-Languages #10
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
a59197e
test: Transition to Jest
keplersj c713537
test: Make use of snapshots
keplersj 8d22f6e
test: Move code samples to fixture files.
keplersj fdb3a8f
test: Dynamically loop through fixture files
keplersj b0178d8
test: Add fixtures from the highlight.js codebase.
keplersj 6537b2c
fix: return data when class not prefixed correctly
keplersj f04ad2c
test: Configure Jest to output only JSON coverage and to the console
keplersj 450266a
ci: Display code samples and run build before test
keplersj de2b227
docs(readme): highlight new complete language support
felixfbecker 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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,30 @@ | ||
#ЗагрузитьИзФайла ext_module.txt // директива 7.7 | ||
#Если Клиент ИЛИ НаКлиенте Тогда // инструкции препроцессора | ||
&НаКлиентеНаСервереБезКонтекста // директивы компиляции | ||
Функция ТолстыйКлиентОбычноеПриложение(Знач Параметр1 = Неопределено, // комментарий | ||
Параметр2 = "", ПараметрN = 123.45, ПарамNN) Экспорт // еще комментарий | ||
Попытка | ||
Результат_Булевы_Значения = Новый Структура("П1, П2", Истина, Ложь, NULL, Неопределено); | ||
Перейти ~МеткаGOTO; // комментарий | ||
РезультатТаблицаДат = Новый ТаблицаЗначений; | ||
РезультатТаблицаДат.Колонки.Добавить("Колонка1", | ||
Новый ОписаниеТипов("Дата", , , | ||
Новый КвалификаторыДаты(ЧастиДаты.ДатаВремя)); | ||
НС = РезультатТаблицаДат.Добавить(); НС["Колонка1"] = '20170101120000'); | ||
Исключение | ||
ОписаниеОшибки = ОписаниеОшибки(); // встроенная функция | ||
Масс = Новый Массив; // встроенный тип | ||
Для Каждого Значение Из Масс Цикл | ||
Сообщить(Значение + Символы.ПС + " | ||
|продолжение строки"); // продолжение многострочной строки | ||
Продолжить; Прервать; | ||
КонецЦикла; | ||
СправочникСсылка = Справочники.Языки.НайтиПоНаименованию("ru"); // встроенные типы | ||
СправочникОбъект = СправочникСсылка.ПолучитьОбъект(); | ||
ПеречислениеСсылка = Перечисления.ВидыМодификацииДанных.Изменен; | ||
ВызватьИсключение ОписаниеОшибки; | ||
КонецПопытки; | ||
~МеткаGOTO: // еще комментарий | ||
ВД = ВидДвиженияБухгалтерии.Дебет; | ||
КонецФункции // ТолстыйКлиентОбычноеПриложение() | ||
#КонецЕсли |
This file contains hidden or 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,22 @@ | ||
; line comment | ||
|
||
ruleset = [optional] *(group1 / group2 / SP) CRLF ; trailing comment | ||
|
||
group1 = alt1 | ||
group1 =/ alt2 | ||
|
||
alt1 = %x41-4D / %d78-90 | ||
|
||
alt2 = %b00100001 | ||
|
||
group2 = *1DIGIT / 2*HEXDIG / 3*4OCTET | ||
|
||
optional = hex-codes | ||
/ literal | ||
/ sensitive | ||
/ insensitive | ||
|
||
hex-codes = %x68.65.6C.6C.6F | ||
literal = "string literal" | ||
sensitive = %s"case-sensitive string" | ||
insensitive = %i"case-insensitive string" |
This file contains hidden or 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,36 @@ | ||
.text | ||
|
||
.global connect | ||
connect: | ||
mov r3, #2 ; s->sin_family = AF_INET | ||
strh r3, [sp] | ||
ldr r3, =server_port ; s->sin_port = server_port | ||
ldr r3, [r3] | ||
strh r3, [sp, #2] | ||
ldr r3, =server_addr ; s->sin_addr = server_addr | ||
ldr r3, [r3] | ||
str r3, [sp, #4] | ||
mov r3, #0 ; bzero(&s->sin_zero) | ||
str r3, [sp, #8] | ||
str r3, [sp, #12] | ||
mov r1, sp ; const struct sockaddr *addr = sp | ||
|
||
ldr r7, =connect_call | ||
ldr r7, [r7] | ||
swi #0 | ||
|
||
add sp, sp, #16 | ||
pop {r0} ; pop sockfd | ||
|
||
pop {r7} | ||
pop {fp, ip, lr} | ||
mov sp, ip | ||
bx lr | ||
|
||
.data | ||
socket_call: .long 281 | ||
connect_call: .long 283 | ||
|
||
/* all addresses are network byte-order (big-endian) */ | ||
server_addr: .long 0x0100007f ; localhost | ||
server_port: .hword 0x0b1a |
This file contains hidden or 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,19 @@ | ||
;* Title: Block Copy Routines | ||
;* Version: 1.1 | ||
|
||
.include "8515def.inc" | ||
|
||
rjmp RESET ;reset handle | ||
|
||
.def flashsize=r16 ;size of block to be copied | ||
|
||
flash2ram: | ||
lpm ;get constant | ||
st Y+,r0 ;store in SRAM and increment Y-pointer | ||
adiw ZL,1 ;increment Z-pointer | ||
dec flashsize | ||
brne flash2ram ;if not end of table, loop more | ||
ret | ||
|
||
.def ramtemp =r1 ;temporary storage register | ||
.def ramsize =r16 ;size of block to be copied |
This file contains hidden or 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 @@ | ||
20.164.151.111 - - [20/Aug/2015:22:20:18 -0400] "GET /mywebpage/index.php HTTP/1.1" 403 772 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.220 Safari/535.1" |
This file contains hidden or 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,24 @@ | ||
package org.example.dummy { | ||
import org.dummy.*; | ||
|
||
/*define package inline interface*/ | ||
public interface IFooBarzable { | ||
public function foo(... pairs):Array; | ||
} | ||
|
||
public class FooBar implements IFooBarzable { | ||
static private var cnt:uint = 0; | ||
private var bar:String; | ||
|
||
//constructor | ||
public function TestBar(bar:String):void { | ||
bar = bar; | ||
++cnt; | ||
} | ||
|
||
public function foo(... pairs):Array { | ||
pairs.push(bar); | ||
return pairs; | ||
} | ||
} | ||
} |
This file contains hidden or 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,17 @@ | ||
package body Sqlite.Simple is | ||
|
||
Foo : int := int'Size; | ||
Bar : int := long'Size; | ||
|
||
Error_Message_C : chars_ptr := Sqlite_Errstr (Error); | ||
Error_Message : String := Null_Ignore_Value (Error_Message_C); | ||
begin | ||
|
||
Named : for Index in Foo..Bar loop | ||
Put ("Hi[]{}"); | ||
end loop Named; | ||
|
||
Foo := Bar; | ||
end Message; | ||
|
||
end Sqlite.Simple; |
This file contains hidden or 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,19 @@ | ||
# rewrite`s rules for wordpress pretty url | ||
LoadModule rewrite_module modules/mod_rewrite.so | ||
RewriteCond %{REQUEST_FILENAME} !-f | ||
RewriteCond %{REQUEST_FILENAME} !-d | ||
RewriteRule . index.php [NC,L] | ||
|
||
ExpiresActive On | ||
ExpiresByType application/x-javascript "access plus 1 days" | ||
|
||
Order Deny,Allow | ||
Allow from All | ||
|
||
<Location /maps/> | ||
RewriteMap map txt:map.txt | ||
RewriteMap lower int:tolower | ||
RewriteCond %{REQUEST_URI} ^/([^/.]+)\.html$ [NC] | ||
RewriteCond ${map:${lower:%1}|NOT_FOUND} !NOT_FOUND | ||
RewriteRule .? /index.php?q=${map:${lower:%1}} [NC,L] | ||
</Location> |
This file contains hidden or 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,14 @@ | ||
repeat 5 times | ||
if foo is greater than bar then | ||
display dialog "Hello there" | ||
else | ||
beep | ||
end if | ||
end repeat | ||
|
||
(* comment (*nested comment*) *) | ||
on do_something(s, y) | ||
return {s + pi, y mod 4} | ||
end do_something | ||
|
||
do shell script "/bin/echo 'hello'" |
This file contains hidden or 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,24 @@ | ||
/* | ||
Blink | ||
Turns on an LED on for one second, then off for one second, repeatedly. | ||
|
||
This example code is in the public domain. | ||
*/ | ||
|
||
// Pin 13 has an LED connected on most Arduino boards. | ||
// give it a name: | ||
int led = 13; | ||
|
||
// the setup routine runs once when you press reset: | ||
void setup() { | ||
// initialize the digital pin as an output. | ||
pinMode(led, OUTPUT); | ||
} | ||
|
||
// the loop routine runs over and over again forever: | ||
void loop() { | ||
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level) | ||
delay(1000); // wait for a second | ||
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW | ||
delay(1000); // wait for a second | ||
} |
This file contains hidden or 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,65 @@ | ||
Hello, World! | ||
============ | ||
Author Name, <[email protected]> | ||
|
||
you can write text http://example.com[with links], optionally | ||
using an explicit link:http://example.com[link prefix]. | ||
|
||
* single quotes around a phrase place 'emphasis' | ||
** alternatively, you can put underlines around a phrase to add _emphasis_ | ||
* astericks around a phrase make the text *bold* | ||
* pluses around a phrase make it +monospaced+ | ||
* `smart' quotes using a leading backtick and trailing single quote | ||
** use two of each for double ``smart'' quotes | ||
|
||
- escape characters are supported | ||
- you can escape a quote inside emphasized text like 'here\'s johnny!' | ||
|
||
term:: definition | ||
another term:: another definition | ||
|
||
// this is just a comment | ||
|
||
Let's make a break. | ||
|
||
''' | ||
|
||
//// | ||
we'll be right with you | ||
|
||
after this brief interruption. | ||
//// | ||
|
||
== We're back! | ||
|
||
Want to see a image::images/tiger.png[Tiger]? | ||
|
||
.Nested highlighting | ||
++++ | ||
<this_is inline="xml"></this_is> | ||
++++ | ||
|
||
____ | ||
asciidoc is so powerful. | ||
____ | ||
|
||
another quote: | ||
|
||
[quote, Sir Arthur Conan Doyle, The Adventures of Sherlock Holmes] | ||
____ | ||
When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth. | ||
____ | ||
|
||
Getting Literal | ||
--------------- | ||
|
||
want to get literal? prefix a line with a space. | ||
|
||
.... | ||
I'll join that party, too. | ||
.... | ||
|
||
. one thing (yeah!) | ||
. two thing `i can write code`, and `more` wipee! | ||
|
||
NOTE: AsciiDoc is quite cool, you should try it. |
Oops, something went wrong.
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.
jest seems to always generate JSON, lcov and clover format, which are then all three uploaded to codecov. I am a bit worried that if one format is better than the other (does lcov support sub-line coverage?) we get the lowest common denominator of features as codecov merges the coverage. Is there a way to only tell jest to generate JSON?
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.
Can do using this configuration option
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.
Cool, lets set that to
text-summary
andjson
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.
That does look better https://codecov.io/gh/felixfbecker/cli-highlight/pull/10/src/src/index.ts?before=src/index.ts