Skip to content

Commit 9749e34

Browse files
committed
Use real files for custom transformer test
1 parent 8e98f3c commit 9749e34

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

tests/custom-transformers.test.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blah blah blah

tests/custom-transformers.test.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import path from 'path'
12
import { run, html, css } from './util/run'
23

34
function customTransformer(content) {
@@ -44,11 +45,12 @@ test('transform.{extension}', () => {
4445
let config = {
4546
content: {
4647
files: [
47-
{ raw: html`<div class="uppercase"></div>`, extension: 'html' },
48-
{ raw: html`<div class="uppercase"></div>`, extension: 'php' },
48+
path.resolve(__dirname, './custom-transformers.test.html'),
49+
path.resolve(__dirname, './custom-transformers.test.php'),
4950
],
5051
transform: {
51-
html: customTransformer,
52+
html: () => 'uppercase',
53+
php: () => 'lowercase',
5254
},
5355
},
5456
}

tests/custom-transformers.test.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
blah blah blah

0 commit comments

Comments
 (0)