Skip to content

Commit

Permalink
fix: address code review
Browse files Browse the repository at this point in the history
  • Loading branch information
alexghr committed Oct 23, 2023
1 parent b9a6a68 commit df506d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
7 changes: 2 additions & 5 deletions compiler/noirc_frontend/src/graph/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,8 @@ mod crate_name {
}

#[test]
fn it_can_serialize_and_deserialize() {
let crate_name = "test_crate".parse::<CrateName>().unwrap();
let serialized = serde_json::to_string(&crate_name).unwrap();
let deserialized = serde_json::from_str::<CrateName>(&serialized).unwrap();
assert_eq!(crate_name, deserialized);
fn it_rejects_bad_crate_names_when_deserializing() {
assert!(serde_json::from_str::<CrateName>("bad-name").is_err());
}
}

Expand Down
4 changes: 1 addition & 3 deletions compiler/wasm/test/node/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ import { join, resolve } from 'node:path';
import { compile } from '@noir-lang/noir_wasm';
import { initializeResolver } from '@noir-lang/source-resolver';

// const absoluteNoirSourcePath = ;
// const absoluteNargoArtifactPath = join(__dirname, nargoArtifactPath);

// eslint-disable-next-line @typescript-eslint/no-explicit-any
async function getPrecompiledSource(path: string): Promise<any> {
const compiledData = readFileSync(resolve(__dirname, path)).toString();
Expand All @@ -36,6 +33,7 @@ describe('noir wasm compilation', () => {

describe('can compile scripts with dependencies', () => {
beforeEach(() => {
// this test requires a custom resolver in order to correctly resolve dependencies
initializeResolver((file) => {
switch (file) {
case '/script/main.nr':
Expand Down

0 comments on commit df506d6

Please sign in to comment.