Skip to content

Commit

Permalink
Use real files for custom transformer test
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwathan committed Dec 4, 2021
1 parent 8e98f3c commit 9749e34
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 1 addition & 0 deletions tests/custom-transformers.test.html
@@ -0,0 +1 @@
blah blah blah
8 changes: 5 additions & 3 deletions tests/custom-transformers.test.js
@@ -1,3 +1,4 @@
import path from 'path'
import { run, html, css } from './util/run'

function customTransformer(content) {
Expand Down Expand Up @@ -44,11 +45,12 @@ test('transform.{extension}', () => {
let config = {
content: {
files: [
{ raw: html`<div class="uppercase"></div>`, extension: 'html' },
{ raw: html`<div class="uppercase"></div>`, extension: 'php' },
path.resolve(__dirname, './custom-transformers.test.html'),
path.resolve(__dirname, './custom-transformers.test.php'),
],
transform: {
html: customTransformer,
html: () => 'uppercase',
php: () => 'lowercase',
},
},
}
Expand Down
1 change: 1 addition & 0 deletions tests/custom-transformers.test.php
@@ -0,0 +1 @@
blah blah blah

0 comments on commit 9749e34

Please sign in to comment.