Skip to content
This repository has been archived by the owner on Sep 13, 2023. It is now read-only.

Commit

Permalink
unit tests variable scope fix
Browse files Browse the repository at this point in the history
  • Loading branch information
saurabhdaware committed May 19, 2020
1 parent 9af4ce7 commit 42b70c7
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions tests/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,26 +9,25 @@ const {

const abellRenderer = require('../src/index.js');


const sampleSandbox = {
$contentList: [
{name: 'Nice'},
{name: 'very cool'}
]
};

const abellTemplate = fs.readFileSync(
path.join(__dirname, 'resources', 'if-input.abell'),
'utf-8'
);

const htmlTemplate = fs.readFileSync(
path.join(__dirname, 'resources', 'should-output.html'),
'utf-8'
);

describe('render() - renders abellTemplate into HTML Text', () => {
it('should output given htmlTemplate on given abellTemplate', () => {
const abellTemplate = fs.readFileSync(
path.join(__dirname, 'resources', 'if-input.abell'),
'utf-8'
);

const htmlTemplate = fs.readFileSync(
path.join(__dirname, 'resources', 'should-output.html'),
'utf-8'
);

const sampleSandbox = {
$contentList: [
{name: 'Nice'},
{name: 'very cool'}
]
};

expect(
abellRenderer
.render(
Expand Down

0 comments on commit 42b70c7

Please sign in to comment.