From 9c87d51fb847a3ea4e6a7566671bca12603e3aa7 Mon Sep 17 00:00:00 2001 From: Matheus Afonso Martins Moreira Date: Sun, 27 Aug 2023 04:43:40 -0300 Subject: [PATCH] filter: merge ustom-filters.js into index.test.js There's really no need for this file. --- packages/pug-filters/test/custom-filters.js | 9 --------- packages/pug-filters/test/index.test.js | 9 ++++++++- 2 files changed, 8 insertions(+), 10 deletions(-) delete mode 100644 packages/pug-filters/test/custom-filters.js diff --git a/packages/pug-filters/test/custom-filters.js b/packages/pug-filters/test/custom-filters.js deleted file mode 100644 index 74755e51..00000000 --- a/packages/pug-filters/test/custom-filters.js +++ /dev/null @@ -1,9 +0,0 @@ -var assert = require('assert'); - -module.exports = { - custom: function(str, options) { - expect(options.opt).toBe('val'); - expect(options.num).toBe(2); - return 'BEGIN' + str + 'END'; - }, -}; diff --git a/packages/pug-filters/test/index.test.js b/packages/pug-filters/test/index.test.js index 4471576d..d8ae7894 100644 --- a/packages/pug-filters/test/index.test.js +++ b/packages/pug-filters/test/index.test.js @@ -3,7 +3,14 @@ var fs = require('fs'); var assert = require('assert'); var handleFilters = require('../').handleFilters; -var customFilters = require('./custom-filters.js'); + +var customFilters = { + custom: function(str, options) { + expect(options.opt).toBe('val'); + expect(options.num).toBe(2); + return 'BEGIN' + str + 'END'; + } +}; process.chdir(__dirname + '/../');