<commit_before>'use strict';

const assert = require('assert');

const render = require('../lib/render');
const prepareContext = require('../lib/prepareContext');

describe('render', function() {
  it('does a render', function(done) {
    const env = {
      herman: {
        customCSS: 'dist/css/main.css',
        minifiedIcons: 'templates/_icons.svg',
        sass: {
          jsonfile: 'dist/css/json.css',
        },
      },
      dir: __dirname,
      renderString() {},
    };
    const tpl = 'templates/base.j2';
    const dest = `${__dirname}/dest`;
    prepareContext({
      data: [],
      groups: {},
      display: {},
    })
      .then(ctx => render(env, tpl, dest, ctx))
      .then(() => {
        // Look for side-effects
        assert.ok(true);
        done();
      })<commit_msg>Fix jstest.<commit_after>'use strict';

const assert = require('assert');

const prepareContext = require('../lib/prepareContext');
const render = require('../lib/render');
const { nunjucksEnv } = require('../constants');

describe('render', function() {
  it('does a render', function(done) {
    const tpl = 'templates/base.j2';
    const dest = `${__dirname}/dest/base.html`;
    prepareContext({
      data: [],
      groups: {},
      display: {},
    })
      .then(ctx => render(nunjucksEnv, tpl, dest, ctx))
      .then(() => {
        // Look for side-effects
        assert.ok(true);
        done();
      })
{'fraction_non_alphanumeric': 0.1848208011243851, 'fraction_numerical': 0.0014054813773717498, 'mean_word_length': 2.3985680190930787, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2837239', 'n_tokens_mistral': 439, 'n_tokens_neox': 438, 'n_words': 93}