rename test folders
This commit is contained in:
parent
28559585ba
commit
6cf15c7d04
@ -4,7 +4,7 @@ import test from 'ava';
|
||||
|
||||
import {getODSTableRawContent} from '../exports.js'
|
||||
|
||||
const nomAgeContent = (await readFile('./tests/data/nom-age.ods')).buffer
|
||||
const nomAgeContent = (await readFile('./tests/fixtures/nom-age.ods')).buffer
|
||||
|
||||
test('basic', async t => {
|
||||
const table = await getODSTableRawContent(nomAgeContent);
|
||||
|
||||
@ -4,11 +4,11 @@ import {join} from 'node:path';
|
||||
import {getOdtTemplate} from '../scripts/odf/odtTemplate-forNode.js'
|
||||
|
||||
import {fillOdtTemplate, getOdtTextContent} from '../exports.js'
|
||||
import { listZipEntries } from './_helpers/zip-analysis.js';
|
||||
import { listZipEntries } from './helpers/zip-analysis.js';
|
||||
|
||||
|
||||
test('basic template filling with variable substitution', async t => {
|
||||
const templatePath = join(import.meta.dirname, './data/template-anniversaire.odt')
|
||||
const templatePath = join(import.meta.dirname, './fixtures/template-anniversaire.odt')
|
||||
const templateContent = `Yo {nom} !
|
||||
Tu es né.e le {dateNaissance}
|
||||
|
||||
@ -38,7 +38,7 @@ Bonjoir ☀️
|
||||
|
||||
|
||||
test('basic template filling with {#each}', async t => {
|
||||
const templatePath = join(import.meta.dirname, './data/enum-courses.odt')
|
||||
const templatePath = join(import.meta.dirname, './fixtures/enum-courses.odt')
|
||||
const templateContent = `🧺 La liste de courses incroyable 🧺
|
||||
|
||||
{#each listeCourses as élément}
|
||||
@ -74,7 +74,7 @@ Pâtes à lasagne (fraîches !)
|
||||
});
|
||||
|
||||
test('Filling with {#each} and non-iterable value results in no error and empty result', async t => {
|
||||
const templatePath = join(import.meta.dirname, './data/enum-courses.odt')
|
||||
const templatePath = join(import.meta.dirname, './fixtures/enum-courses.odt')
|
||||
const templateContent = `🧺 La liste de courses incroyable 🧺
|
||||
|
||||
{#each listeCourses as élément}
|
||||
@ -105,7 +105,7 @@ test('Filling with {#each} and non-iterable value results in no error and empty
|
||||
|
||||
|
||||
test('template filling with {#each} generating a list', async t => {
|
||||
const templatePath = join(import.meta.dirname, './data/liste-courses.odt')
|
||||
const templatePath = join(import.meta.dirname, './fixtures/liste-courses.odt')
|
||||
const templateContent = `🧺 La liste de courses incroyable 🧺
|
||||
|
||||
- {#each listeCourses as élément}
|
||||
@ -142,7 +142,7 @@ test('template filling with {#each} generating a list', async t => {
|
||||
|
||||
|
||||
test('template filling with 2 sequential {#each}', async t => {
|
||||
const templatePath = join(import.meta.dirname, './data/liste-fruits-et-légumes.odt')
|
||||
const templatePath = join(import.meta.dirname, './fixtures/liste-fruits-et-légumes.odt')
|
||||
const templateContent = `Liste de fruits et légumes
|
||||
|
||||
Fruits
|
||||
@ -195,7 +195,7 @@ Poivron 🫑
|
||||
|
||||
|
||||
test('template filling with nested {#each}s', async t => {
|
||||
const templatePath = join(import.meta.dirname, './data/légumes-de-saison.odt')
|
||||
const templatePath = join(import.meta.dirname, './fixtures/légumes-de-saison.odt')
|
||||
const templateContent = `Légumes de saison
|
||||
|
||||
{#each légumesSaison as saisonLégumes}
|
||||
@ -281,7 +281,7 @@ Hiver
|
||||
|
||||
|
||||
test('template filling of a table', async t => {
|
||||
const templatePath = join(import.meta.dirname, './data/tableau-simple.odt')
|
||||
const templatePath = join(import.meta.dirname, './fixtures/tableau-simple.odt')
|
||||
const templateContent = `Évolution énergie en kWh par personne en France
|
||||
|
||||
Année
|
||||
@ -343,7 +343,7 @@ Année
|
||||
|
||||
|
||||
test('template filling preserves images', async t => {
|
||||
const templatePath = join(import.meta.dirname, './data/template-avec-image.odt')
|
||||
const templatePath = join(import.meta.dirname, './fixtures/template-avec-image.odt')
|
||||
|
||||
const data = {
|
||||
commentaire : `J'adooooooore 🤩 West covinaaaaaaaaaaa 🎶`
|
||||
|
||||
@ -5,7 +5,7 @@ import test from 'ava';
|
||||
import {getODSTableRawContent} from '../exports.js'
|
||||
|
||||
test('.ods file with table:number-columns-repeated attribute in cell', async t => {
|
||||
const repeatedCellFileContent = (await readFile('./tests/data/cellules-répétées.ods')).buffer
|
||||
const repeatedCellFileContent = (await readFile('./tests/fixtures/cellules-répétées.ods')).buffer
|
||||
|
||||
const table = await getODSTableRawContent(repeatedCellFileContent);
|
||||
|
||||
@ -17,7 +17,7 @@ test('.ods file with table:number-columns-repeated attribute in cell', async t =
|
||||
|
||||
|
||||
test('.ods cells with dates should be recognized', async t => {
|
||||
const odsFileWithDates = (await readFile('./tests/data/cellules avec dates.ods')).buffer
|
||||
const odsFileWithDates = (await readFile('./tests/fixtures/cellules avec dates.ods')).buffer
|
||||
const table = await getODSTableRawContent(odsFileWithDates);
|
||||
|
||||
const feuille1 = table.get('Feuille1')
|
||||
@ -39,7 +39,7 @@ test('.ods cells with dates should be recognized', async t => {
|
||||
|
||||
|
||||
test('.ods file with new lines in content is ', async t => {
|
||||
const repeatedCellFileContent = (await readFile('./tests/data/cellule avec sauts.ods')).buffer
|
||||
const repeatedCellFileContent = (await readFile('./tests/fixtures/cellule avec sauts.ods')).buffer
|
||||
|
||||
const table = await getODSTableRawContent(repeatedCellFileContent);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user