-
-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
59a59d1
commit 9e6620a
Showing
4 changed files
with
119 additions
and
17 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
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,22 @@ | ||
v-row(no-gutters) | ||
v-col(cols="12") | ||
div(v-t="'global.copy-variables-title'").text-body-2.font-weight-medium | ||
v-col(cols="12") | ||
a( | ||
v-for="variable in variables", | ||
:key="variable", | ||
v-text="`$\\{${variable}}`", | ||
@click="copyToClipboard(variable)" | ||
).text-body-2.d-inline.mr-4 | ||
div( | ||
v-t="'entity-management.entity-group.crud.entity-types-txt'" | ||
).text-body-2.text--secondary.mb-2.mt-4.class--1519 | ||
|
||
div( | ||
v-t="'type.place.property'" | ||
).class-1.class-2.class-3.class-4.class-5.class-6.class-7.get-to-121.class-10.class-50.sm | ||
|
||
div(role="document").modal-dialog.modal-lg | ||
.modal-content | ||
.modal-header.text-center.d-block | ||
h1#modal-title.h4.modal-title.d-inline-block.ml-4= "test goes here" |
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,46 @@ | ||
import { readFileSync } from 'fs'; | ||
import { resolve } from 'path'; | ||
import { format } from 'prettier'; | ||
import { plugin } from './../../../src/index'; | ||
|
||
describe('Issues', () => { | ||
test('should respect printWidth and pugClassLocation with pugSortAttributesEnd', () => { | ||
const expected: string = readFileSync(resolve(__dirname, 'formatted.pug'), 'utf8'); | ||
const code: string = readFileSync(resolve(__dirname, 'unformatted.pug'), 'utf8'); | ||
const actual: string = format(code, { | ||
parser: 'pug', | ||
plugins: [plugin], | ||
|
||
printWidth: 120, | ||
|
||
pugSortAttributesEnd: ['^@click'], | ||
pugClassLocation: 'after-attributes' | ||
}); | ||
|
||
expect(actual).toBe(expected); | ||
}); | ||
|
||
test('should keep same format after two runs with printWidth and pugClassLocation', () => { | ||
const expected: string = readFileSync(resolve(__dirname, 'formatted.pug'), 'utf8'); | ||
const code: string = readFileSync(resolve(__dirname, 'unformatted.pug'), 'utf8'); | ||
const run1: string = format(code, { | ||
parser: 'pug', | ||
plugins: [plugin], | ||
|
||
printWidth: 120, | ||
|
||
pugClassLocation: 'after-attributes' | ||
}); | ||
|
||
const run2: string = format(run1, { | ||
parser: 'pug', | ||
plugins: [plugin], | ||
|
||
printWidth: 120, | ||
|
||
pugClassLocation: 'after-attributes' | ||
}); | ||
|
||
expect(run2).toBe(expected); | ||
}); | ||
}); |
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,20 @@ | ||
v-row(no-gutters) | ||
v-col(cols="12") | ||
.text-body-2.font-weight-medium(v-t="'global.copy-variables-title'") | ||
v-col(cols="12") | ||
a.text-body-2.d-inline.mr-4( | ||
v-for="variable in variables", | ||
:key="variable", | ||
v-text="`$\\{${variable}}`", | ||
@click="copyToClipboard(variable)" | ||
) | ||
div( | ||
v-t="'entity-management.entity-group.crud.entity-types-txt'" | ||
).text-body-2.text--secondary.mb-2.mt-4.class--1519 | ||
|
||
div(v-t="'type.place.property'").class-1.class-2.class-3.class-4.class-5.class-6.class-7.get-to-121.class-10.class-50.sm | ||
|
||
.modal-dialog.modal-lg(role="document") | ||
.modal-content | ||
.modal-header.text-center.d-block | ||
h1#modal-title.h4.modal-title.d-inline-block.ml-4= 'test goes here' |