Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Added missing xtest #2550

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions exercises/practice/knapsack/knapsack.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ describe('Knapsack', () => {
expect(knapsack(100, [])).toEqual(0);
});

test('one item, too heavy', () => {
xtest('one item, too heavy', () => {
const items = [{ weight: 100, value: 1 }];
expect(knapsack(10, items)).toEqual(0);
});

test('five items (cannot be greedy by weight)', () => {
xtest('five items (cannot be greedy by weight)', () => {
const items = [
{ weight: 2, value: 5 },
{ weight: 2, value: 5 },
Expand All @@ -21,7 +21,7 @@ describe('Knapsack', () => {
expect(knapsack(10, items)).toEqual(21);
});

test('five items (cannot be greedy by value)', () => {
xtest('five items (cannot be greedy by value)', () => {
const items = [
{ weight: 2, value: 20 },
{ weight: 2, value: 20 },
Expand All @@ -32,7 +32,7 @@ describe('Knapsack', () => {
expect(knapsack(10, items)).toEqual(80);
});

test('example knapsack', () => {
xtest('example knapsack', () => {
const items = [
{ weight: 5, value: 10 },
{ weight: 4, value: 40 },
Expand All @@ -42,7 +42,7 @@ describe('Knapsack', () => {
expect(knapsack(10, items)).toEqual(90);
});

test('8 items', () => {
xtest('8 items', () => {
const items = [
{ weight: 25, value: 350 },
{ weight: 35, value: 400 },
Expand All @@ -56,7 +56,7 @@ describe('Knapsack', () => {
expect(knapsack(104, items)).toEqual(900);
});

test('15 items', () => {
xtest('15 items', () => {
const items = [
{ weight: 70, value: 135 },
{ weight: 73, value: 139 },
Expand Down