Upload via GUI (85 Dateien)
This commit is contained in:
@@ -2,9 +2,17 @@ const test = require('node:test');
|
||||
const assert = require('node:assert');
|
||||
const { listTemplates, buildGitignore } = require('../src/features/gitignoreTemplates.js');
|
||||
|
||||
test('listTemplates nennt Node, .NET und Electron', () => {
|
||||
const keys = listTemplates().map(t => t.key);
|
||||
assert.deepStrictEqual(keys, ['node', 'dotnet', 'electron']);
|
||||
test('listTemplates nennt alle Vorlagen mit Beschriftung', () => {
|
||||
const list = listTemplates();
|
||||
assert.deepStrictEqual(list.map(t => t.key), ['node', 'dotnet', 'electron', 'python', 'java', 'php', 'unity']);
|
||||
assert.ok(list.every(t => t.label));
|
||||
});
|
||||
|
||||
test('buildGitignore: Vorlagen für Python, Java, PHP und Unity enthalten ihre Kerneinträge', () => {
|
||||
assert.match(buildGitignore(['python']), /__pycache__\//);
|
||||
assert.match(buildGitignore(['java']), /target\//);
|
||||
assert.match(buildGitignore(['php']), /vendor\//);
|
||||
assert.match(buildGitignore(['unity']), /\[Ll\]ibrary\//);
|
||||
});
|
||||
|
||||
test('buildGitignore enthält immer den allgemeinen Teil', () => {
|
||||
|
||||
Reference in New Issue
Block a user